Legend
April 12, 2026
Answered
How to move multiple selected objects to the top layer of all objects?
- April 12, 2026
- 2 replies
- 39 views
Suppose I’ve selected three objects. In the end, I want those three objects to remain selected and be moved to the top of the stack relative to all other objects.
I tried the code below, but it seems to only support a single object.
Of course, only one can be at the very top.
I just need the selected objects to be on top of the others.
var d = app.activeDocument;
var item = d.selection[0];
var items = d.selection;
var sel = items;
//do something
d.selection = sel;
for (j = 0; i < sel .length; j++) {
//sel[j].bringToFront();
sel[j].bringForward();
}
