Copy link to clipboard
Copied
Hi all!
I have been allover the forum but still seem not to be able to find the right ressource.
Is there an EASY way to change certain values .. especially ie. WIDTH and HEIGHT of an object by an external file (excel, xml)
Also is there a way to give a path point (ie. top right corner of a rectangle) a specific ID and move it on the artboard by values (ie... move point B on x-axis 3mm to the left)
I wish it woule be as easy (and intuitive) as inserting a unique variable in the "width" field;)
thank you for your input!
best, Flo
Copy link to clipboard
Copied
Easy, it's a relative term. I would certainly say though that doing javascript is easier than applescript or vbscript!
Reading spreadsheet (txt/csv) data is fairly easy with js, but it's all about writing that custom script for your needs.
As for path point IDs, I doubt it - although there's a pathPoints.getByName() function in the Object Model Viewer. I just don't see how one can set a 'name' property to a point in the UI, and I have not tested the setting of the 'name' property via script either.
Scaling width , height, making transforms is totally possible via scripting, and so is moving individual path points, except you'd probably have to deduce the one you want from their XY coordinates.
Copy link to clipboard
Copied
Great advice!
do you recommend any specific online-ressources for scripting with illustrator?
Copy link to clipboard
Copied
Well, here's the spot, you found it! Welcome!
Copy link to clipboard
Copied
hehe, of course!
I am a beginner and looking for tutorials/finished code that I can alter (the the help of the forum!!:)
something like here for the canvas element... but maybe more illustrator&scripting oriented!
Copy link to clipboard
Copied
You can start looking at the scripting guides from Adobe. There are pretty well done :
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2017/AI_ScriptGd.pdf
The reference is worth a Bible too:
Or you may prefer lightweight tool such as
Adobe Illustrator CS6 Type Library JS: Table of Contents
Loic
Copy link to clipboard
Copied
perfect, thank you, will digg into all those!
Copy link to clipboard
Copied
When you download the ExtendScript ToolKit, the Help > Object Model Viewer will have 'documentation' to help locate the scripting commands you want.