Skip to main content
suneelkv
Known Participant
May 21, 2015
Question

Get all the objects within the layer

  • May 21, 2015
  • 1 reply
  • 310 views

Hi All,

Am new to adobe scripting... I'm trying to find the script which can give the objects available in a particular layer.

Can any one tell the api which shall give the count the no. of elements available in a layer?

Please help

This topic has been closed for replies.

1 reply

Inspiring
May 21, 2015

Will tell you the items directly underneath the layers. If you want to keep going in groups that are inside the layers, keep adding to it.

doc = app.activeDocument;

layers = doc.layers;

for (var x = 0; x < layers.length; x++){

    for (var i = 0; i < layers.pageItems.length; i++){

        alert(layers.pageItems.name);

    }

}