Copy link to clipboard
Copied
hi there,
i'm stuck with this problem.. i've created a line on page using JS.
var myLine;
myLine=app.activeDocument.graphicLines.add();
myLine.geometricBounds = ['200mm', '0mm', '200mm','300mm'];
myLine.strokeWeight ="8pt";
when i select the line on page, it gives X: 0mm, Y:198.589mm, L:300mm
what i don't understand is why Y is not 200mm? How to make it 200mm.
Thank you.
app.activeDocument.layoutWindows[0].transformReferencePoint = LEFT_CENTER_ANCHOR;
HTH
Trevor
Copy link to clipboard
Copied
Can you spot the difference?
Which of the 9 squares is highlighted by you?
Copy link to clipboard
Copied
the top one..
anyway to use JS to set the default as bottom?
Copy link to clipboard
Copied
Re: find and remove text frames with same geometricBounds
Re: Graphic frame bounding box
useful threads to use math round format
Copy link to clipboard
Copied
Hi tpk1982
Sorry you are way off, this has nothing to do with math rounding.
There's a setting for which reference point of the control bounds are being used.
I'm trying to remember how to refer to it.
Click the right box in and look at the x value.
Trevor
Copy link to clipboard
Copied
Thanks Trevor, maybe i oversight the requirement
Copy link to clipboard
Copied
app.activeDocument.layoutWindows[0].transformReferencePoint = LEFT_CENTER_ANCHOR;
HTH
Trevor
Copy link to clipboard
Copied
got it.. Thank you Trevor
app.activeDocument.layoutWindows[0].transformReferencePoint = AnchorPoint.BOTTOM_LEFT_ANCHOR;
Copy link to clipboard
Copied
use Math.round