Copy link to clipboard
Copied
I need to rename every yellow rectangle in my project to have the same name.
Selecting them is easy, however I cannot find a way to rename them all to be the same thing, and the scripts online simply run without apparently doing anything (has the script API changed or something??)
Thanks in advance to those sparing their time to suggest approaches.
(there are a lot of yellow rectangles!)
Sergey Osokin has a nice script to rename selected objects (Rename Items).
It comes with a modal dialog which is pretty useful if you want to rename items often.
Copy link to clipboard
Copied
Can you share a script that doesn't work as you expect?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
this works
var docRef = app.activeDocument;
var sel = docRef.selection;
for (var i=0; i < sel.length; i++)
sel[i].name = "NewName";
Copy link to clipboard
Copied
Sergey Osokin has a nice script to rename selected objects (Rename Items).
It comes with a modal dialog which is pretty useful if you want to rename items often.
Copy link to clipboard
Copied
Yes, that worked well, thank-you.