Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

HELP! Need a script for renaming layers

$
0
0

Hi-

I've got an Illustrator CS6 document that has 500+ layers with individual words on them (a word cloud).  I'm needing to animate this in AE.  When I "Release to Layers (Sequence)", all of the layers become Layer 1, Layer 2, etc.  Is there a script that will rename all of those layers to be the text inside them? 

 

i.e. Layer 1 has the word "Pencil" as a sub-layer, editable text.. I need to rename the Top-Layer Layer 1 to "Pencil".  I'm hoping there is a script that can do this so I don't have to manually rename all of the layers.

 

I have found this script:

 

var idoc = app.activeDocument;

var ilayer = idoc.activeLayer;

 

for (i=0; i<ilayer.layers.length; i++) {

    var isublayer = ilayer.layers[i];

    isublayer.name = isublayer.pageItems[0].name;

}

 

But is doesn't seem to do what I need.

 

Any help would be greatly appreciated!

Thanks,

-Mark


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>