Skip to main content
Inspiring
September 5, 2022
Answered

Adobe indesign: Sublayers not showing in layer panel

  • September 5, 2022
  • 1 reply
  • 1105 views

Hello,

I have a problem modifying sublayers inside a locked layer;

If I expand the layer, I can't see any objects inside it.

The objects appear only if I select the layer shift+ctrl+click on it;

This is not letting the SDK return those items when I run Spread.GetItemsOnPage()

Any idea whats going on here?

Correct answer Manan Joshi

Is it possible to unlock all layers in all masterspreads in JS? 


Layers are not related to spreads or masterspread in such a way that they are sepecific to them. Layers are document wide, so if you want to unlock all the layers in the document the following code shall work

 

app.documents[0].layers.everyItem().locked = false

 

-Manan

1 reply

Community Expert
September 5, 2022

So you mean to say that the locked layer if expanded shows blank under it and when you unlock it then you start seeing the pageitems? Can you post screenshots? This is not normal behaviour, normally you should see the pageitems on expanding the layer even if the layer is locked. Does this happen with every document you create?

Also can you post your code snippet, describing what you are trying to do and what errors does the code give you. If possible send a demo document to test the code with

-Manan

-Manan
Amine9Author
Inspiring
September 5, 2022

Even if I unlock it, pageItems are not shown in the layer panel, to make them appear, I have to unlock the layer and select it by using ctr + alt + click on the layer.
Before and After images attaches



Community Expert
September 5, 2022

Does this happen with every document you create? Can you share a demo document for me to test this out?

Also the after image you shared is it after your script ran on the document? If so then please share the code of the script for us to have a look at.

-Manan

-Manan