How to arrange path item "Send to Back" in illustrator using extendscript?

Explorer ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Hi All,

 

I need to arrange a rectangle path item to "Send to Back" in the document using script.

Screenshot 2021-01-22 at 4.04.34 PM.png

Kindly reply me to on how to send it back.

 

Thanks.

 

 

TOPICS
How to, Scripting

Views

140

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Engaged , Jan 22, 2021 Jan 22, 2021
If the rectangle is selected and you don't want to mess with a PageItem.zOrderPosition via zOrder() command: app.executeMenuCommand("sendToBack") Otherwise:PageItem.zOrder(ZOrderMethod.SENDTOBACK); // as in: var target = app.selection[0]; target.zOrder(ZOrderMethod.SENDTOBACK);

Likes

Translate

Translate
Engaged ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

 

If the rectangle is selected and you don't want to mess with a PageItem.zOrderPosition via zOrder() command:

 

app.executeMenuCommand("sendToBack")

 

Otherwise:

PageItem.zOrder(ZOrderMethod.SENDTOBACK);

// as in:
var target = app.selection[0];
target.zOrder(ZOrderMethod.SENDTOBACK);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Thank you so much..

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

What happens if you use zOrder and there's a selection? Does it crash or something?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

I am using Illustrator CC2018 on Mac. No issues with this version. Is there any issues while we use a lower version of Illustrator? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 24, 2021 Jan 24, 2021

Copy link to clipboard

Copied

LATEST

I use "move" method to do this. I can move an element (selected or not) within the same or different container:

FP_Group.move(myLayer, ElementPlacement.PLACEATEND);
myPrint.move(FP_Group, ElementPlacement.PLACEATBEGINNING);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines