Working in InDesign, I am creating a slug with a rule that points to a rectangle on the page and identifies its contents for the printer. Some of the rectangles are very wide and I would like the arrowhead at the end of the rule to point to the middle of the rectangle. Up until now I’ve been using items of the geometric bounds of the rectangle to set my end rule point. What I would like to do is use the item 3 of the geometric bounds that sets the right width and divide the result by 2 or mulitply it by .5 to set the endpoint for the rule.

I can say:

set mytextline to make new graphic line with properties {geometric bounds:{abounds + 1, bbounds + 2, ebounds + 1, fbounds + 1}, stroke weight:1, stroke color:myColor, left line end:triangle arrow head}

but how do I say:

cbounds / 2

or cbounds x .5

(cbounds * 0.5) or (cbounds / 2) should work.

Cool. /2 didn’t work for me initially, perhaps I had a space in there somewhere. Actually, now that I am infront of my script, what I was looking for was item 4 of geo bounds, not 3.

So, if you take Item 4 (the right margin), and subtract item 2 (the left margin), you end up with a number that is the width of the rectangle. Divide in half and add back in item 2 and you get the center point of the rectangle

(dbounds - bbounds) / 2 + bbounds

`set mytextline to make new graphic line with properties {geometric bounds:{abounds + 2, (dbounds - bbounds) / 2 + bbounds, ebounds + 2, fbounds + 1}, stroke weight:1, stroke color:myColor, left line end:triangle arrow head}`