FORUMS: list search recent posts

Is there a script to automatically rename layers in Illustrator CC?

COW Forums : Adobe Illustrator

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
David Shough
Is there a script to automatically rename layers in Illustrator CC?
on May 7, 2014 at 4:54:22 pm

Hello All,

I am an animator and often have to take complex illustrator artwork and use the "release to layers" command to split up the artwork on individual layers for eventual import and animation in After Effects. It works great, but leaves me with layers with generic names. Sometimes, dozens and dozens of them.

Anyone know of a way to automatically rename selected layers, perhaps with a script, with something like a search and replace function? For example, instead of 10 layers named "Path 01, Path 02, Path 03," etc, I would love to be able to rename them "Round Ball 01, Round Ball 02, Round Ball 03, etc." quickly and efficiently.

Thanks in advance for your help.

Dave


Return to posts index

Alan Wasem
Re: Is there a script to automatically rename layers in Illustrator CC?
on Jul 13, 2015 at 7:12:50 pm

Hi I am trying to modify this script by changing the 'ca' to something else more relevant to my project in this case 'PBW'. But I get this error whenever I change it. 

could someone tell me why this is happening? I would love to be able to rename layers and change the names according to my project.

#target illustrator
 
var docRef = app.activeDocument;
 
with (docRef) {
for (var i = 0; i < layers.length; i++) {
layers[i].name = 'ca' + (layers.length - i).toString();
}
}



 #target illustrator
 
var docRef = app.activeDocument;
 
with (docRef) {
for (var i = 0; i < layers.length; i++) {
layers[i].name = ‘PBW’ + (layers.length - i).toString();
}
}




Return to posts index

Vincent Rosati
Re: Is there a script to automatically rename layers in Illustrator CC?
on Jul 13, 2015 at 7:45:42 pm

I think your single quotes are curly. Try retyping them, single or double quotes, just not curly.

Vince

*Please remember to Rate our replies or check Solution if solved. If you get a good idea from the post, consider clicking the Kudos option.


Return to posts index


Alan Wasem
Re: Is there a script to automatically rename layers in Illustrator CC?
on Jul 13, 2015 at 7:59:52 pm

that was totally it! Thank you! I just had to turn off smart quotes in text edit.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]