Copy link to clipboard
Copied
I have a document (and page) that contains a path. I want to be able to adjust the anchor points for the path in many drawings quickly. How can I access the path property within extendscript?
Many thanks in advance
Thomas
Thanks for the help. I managed to work it out after looking at those links once again.
Thomas
Copy link to clipboard
Copied
Hi Thomas,
what exactly do you like to do?
DOM documentation:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Path.html#d1e266307
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#PathPoint.html#d1e267038
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi Uwe,
Thanks for your reply, so it might be easier if I share the code that I've got so far. Maybe you can point out where I'm going wrong... I'm trying to get to the path property that I need so that I can make changes to it.
Thanks
Thomas
Copy link to clipboard
Copied
Also search Marc Autret's website for pathPoint.
You'll find something like that:
InDesign Scripting Forum Roundup #11
Marc Autret, September 16, 2017
Converting a “Quasi Rectangle” into a Rectangle
https://www.indiscripts.com/post/2017/09/indesign-scripting-forum-roundup-11#hd2sb1
That may lead you to discussions in the forum that we had here:
https://community.adobe.com/t5/indesign-discussions/js-paths-rentagles/td-p/9162704#9648722
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi Thomas,
your variable textFrame holds a text frame of unknown shape to me. This text frame has a paths property.
Note the plural here. Could be a compound path with a lot of paths and every path has path points.
Or all the path points of one path are described as an array of arrays in property entirePath.
Read into the links I gave you to understand the structure. Also see into DOM documentation.
To get the first path point of the first path of your text frame:
textFrame.paths[0].pathPoints[0]
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Thanks for the help. I managed to work it out after looking at those links once again.
Thomas