• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[ Branched ] Illustrator Script to Rename Artboards based on Artboard Size

New Here ,
Jan 29, 2021 Jan 29, 2021

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 ]

 

TOPICS
Scripting

Views

222

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 29, 2021 Jan 29, 2021

Hi @matthijsd65499803 

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
...

Votes

Translate

Translate
Adobe
Community Expert ,
Jan 29, 2021 Jan 29, 2021

Copy link to clipboard

Copied

LATEST

Hi @matthijsd65499803 

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

😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines