Copy link to clipboard
Copied
The scene contains two shapes: a rectangle and an ellipse.
The rectangle shape has been renamed to "Rectangle".
The ellipse shape has not been renamed and is named "<Ellipse>".
Using a script I want to rename the ellipse to "Circle"
for this in the script
var aiDocument = app.documents[0];
var carentLayer = aiDocument.layers[0];
I'm using...
if (carentLayer.pathItems[k].name == undefined){
carentLayer.pathItems[k].name = "Circle";
}
but such a check does not lead to success.
How can I check the name of a figure in a script?
Unnamed items are an empty string (""), not undefined.
Copy link to clipboard
Copied
Unnamed items are an empty string (""), not undefined.