Copy link to clipboard
Copied
Hello @pixxxelschubser
Thank you for this script. In combination with the point to MM change you made, I managed to make this in CM.
Perfect!!
But, I have to work with large number of artboards. You mentioned to create a loop for all the artboard.
I really have no idea how to do that. Can you help me with that?
Illustrator Script to Rename Artboards based on Artboard Size
[ branched from Illustrator Script to Rename Artboards based on Artboard Size to Illustrator forum by moderator ]
there was a loop in the other thread (in this answer Illustrator Script to Rename Artboards based on Artboard Size #2 ). But the code was destroyed two years ago by switching to the new forum software.
Try this corrected version:
var aDoc = app.activeDocument;
for (i=0; i<aDoc.artboards.length; i++) {
var AB = aDoc.artboards[i];
var ABR = AB.artboardRect;
AB.name = ((ABR[2] - ABR[0])*0.3527778).toFixed(1) + " mm × " + ((ABR[1] - ABR[3])*0.3527778).toFixed
...
Copy link to clipboard
Copied
there was a loop in the other thread (in this answer Illustrator Script to Rename Artboards based on Artboard Size #2 ). But the code was destroyed two years ago by switching to the new forum software.
Try this corrected version:
var aDoc = app.activeDocument;
for (i=0; i<aDoc.artboards.length; i++) {
var AB = aDoc.artboards[i];
var ABR = AB.artboardRect;
AB.name = ((ABR[2] - ABR[0])*0.3527778).toFixed(1) + " mm × " + ((ABR[1] - ABR[3])*0.3527778).toFixed (1) + " mm";
}
If that works for you
have fun
😉