Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Separate layers

Community Beginner ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

Break layers by objects. Each object on a separate layer. Is it feasible? I need help.

Preview

screenshot.jpg

Regards,

Kamil

TOPICS
Feature request, Scripting

Views

111

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

Adobe Community Professional , Oct 19, 2021 Oct 19, 2021
Hi Kamil, we already had that topic before. More than one time. My personal suggestion would be this thread where I posted a solution: Separate all objects in one layer to new layers https://community.adobe.com/t5/indesign-discussions/separate-all-objects-in-one-layer-to-new-layers/m-p/11191695#M189410 Regards, Uwe Laubender ( ACP )

Likes

Translate

Translate
Adobe Community Professional ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

Hi Kamil,

we already had that topic before. More than one time.

My personal suggestion would be this thread where I posted a solution:

 

Separate all objects in one layer to new layers

https://community.adobe.com/t5/indesign-discussions/separate-all-objects-in-one-layer-to-new-layers/...

 

Regards,
Uwe Laubender

( ACP )

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 ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

HI,

 

It is certainly feasable, you would just need to use the following:

 

var allPageItems = app.activeDocument.pages.everyItem().pageItems.everyItem().getElements();

for ( var i = 1; i < allPageItems.length; i++){
allPageItems[i].itemLayer = app.activeDocument.layers.add();
}

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
Community Beginner ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

Hi. Cool thing.

@Laubender Laubender Your code creates more layers, in the correct order.

@BarlaeDC  Your fewer layers and the order is swapped.

The pattern layer is not working. Do you have a way for this?

Overall great job.

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 ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

"Laubender Your code creates more layers, in the correct order."

 

That's right.

It does not remove any layers, just builds new ones with one first-level item in every one.

And the stacking order is right, because I am following the stacking order of items in the spread.allPageItems array.

 

Regards,
Uwe Laubender

( ACP )

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 ,
Oct 22, 2021 Oct 22, 2021

Copy link to clipboard

Copied

LATEST

HI,

 

As mentioned above, I just grab all the items and place them on a layer, @Laubender way is the way to go if the order matters.

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