Copy link to clipboard
Copied
I am bringing in a large number of vector files from different sources. When opened the vector drawings have units set to points, mm, etc. and various sized artboards. For each opened vector drawing I want to set the unit to inches and the artboard to 24"x 24". I am setting each of these parameters manually in Document Setup for each vector. Is there a script or action that will allow setting one or both of these parameters? I apologize in advance if there is a simple way to do this that I am unaware of. Any guidance would be appreciated.
Copy link to clipboard
Copied
Assuming one artboard, this should resize it:
var AB = app.activeDocument.artboards[0];
var w = 24 * 72;
var h = 24 * 72;
AB.artboardRect = [AB.artboardRect[0], AB.artboardRect[1], w, -h];
Adding this line
app.executeMenuCommand("unitundoPref");
at the end will bring up the units dialog box, but you will have to select your units manually. Also, this causes buggy behaviour for me in CS6.
Copy link to clipboard
Copied
Thank you!
--
Matthew
[ private informations removed by moderator for security reasons ]