0
Explorer
,
/t5/illustrator-discussions/renaming-script/td-p/11356822
Aug 12, 2020
Aug 12, 2020
Copy link to clipboard
Copied
Hello!
I would like renaming every Compound Path in an Illustrator file via Script.
 
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Aug 12, 2020
Aug 12, 2020
Hi robsmith01,
This is one way:
var compoundPathItems = app.activeDocument.compoundPathItems;
for (var i = 0; i < compoundPathItems.length; i++) {
compoundPathItems[i].name = "found you, number " + i;
}
Just put your own string in place of "found you, number " + i.
Explore related tutorials & articles
Community Expert
,
LATEST
/t5/illustrator-discussions/renaming-script/m-p/11356828#M188956
Aug 12, 2020
Aug 12, 2020
Copy link to clipboard
Copied
Hi robsmith01,
This is one way:
var compoundPathItems = app.activeDocument.compoundPathItems;
for (var i = 0; i < compoundPathItems.length; i++) {
compoundPathItems[i].name = "found you, number " + i;
}
Just put your own string in place of "found you, number " + i.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

