1
Engaged
,
/t5/illustrator-discussions/how-can-i-check-the-name-of-a-figure-in-a-script/td-p/14594226
May 02, 2024
May 02, 2024
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?
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
Guide
,
May 02, 2024
May 02, 2024
Unnamed items are an empty string (""), not undefined.
Explore related tutorials & articles
Guide
,
LATEST
/t5/illustrator-discussions/how-can-i-check-the-name-of-a-figure-in-a-script/m-p/14594246#M406262
May 02, 2024
May 02, 2024
Copy link to clipboard
Copied
Unnamed items are an empty string (""), not undefined.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

