Wednesday, October 30, 2019

How batch rename artboards in Adobe illustrator?


Is there a way to batch rename a bunch of selected artboards in illustrator?


any script or plug-in appreciated...


This is a link to AI script reference... maybe comin' handy for developers. There is some objects for "Artboard" and "Artboards".



Answer



This works (save as .jsx in your script folder)



      function artBoardName_serial() {
var doc = app.activeDocument;
for (var i = 0, l = doc.artboards.length; i < l; i++) {
if (doc.artboards[i].active) {
}
// THIS IS WHERE THE RENAMING HAPPENS
doc.artboards[i].name = "a"+(i+1);
}
}


function renameArtBoard_MAIN() {
if (app.documents.length == 0) {
alert("No Open / Active Document Found");
} else {
artBoardName_serial();
}
}

renameArtBoard_MAIN();

No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...