Skip to content

Instantly share code, notes, and snippets.

@ff6347
Created August 10, 2012 09:31
Show Gist options
  • Save ff6347/3312926 to your computer and use it in GitHub Desktop.
Save ff6347/3312926 to your computer and use it in GitHub Desktop.
rename layers in illustrator
#target illustrator
var docRef = app.activeDocument;
with (docRef) {
var layerlist = new Array();
for (var i = layers.length-1; i >= 0; i--) {
if (layers[i].visible == true){
layerlist.push(layers[i]);
};
};
for (var key in layerlist){
layerlist[key].name = 'layer name '+ key;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment