Skip to main content
Inspiring
May 19, 2014
Answered

How to choose a layer in the layerset ?

  • May 19, 2014
  • 1 reply
  • 398 views

Hi everyone!

I used the script to the selected layers. If the layer is in a group of layers, an error occurs when you call the function:

doc.activeLayer = app.activeDocument.artLayers.getByName(nameLayer);

error- No such element.

How to choose the layer is in a group of layers or out of group? Thanks

This topic has been closed for replies.
Correct answer Andy_Bat1

yes -)

LayerSet

1 reply

c.pfaffenbichler
Community Expert
Community Expert
May 19, 2014

With DOM code one can use a function to iterate through the LayerSets.

But that can be fairly slow, depending on the file, wherefore Action Manager code may be preferable, but that can look quite daunting when one is unfamiliar with it.

Andy_Bat1AuthorCorrect answer
Inspiring
May 19, 2014

yes -)

LayerSet