1 Reply Latest reply on May 21, 2015 11:32 AM by alexw6348634

    Get all the objects within the layer

    suneelkv Level 1

      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

        • 1. Re: Get all the objects within the layer
          alexw6348634 Level 1

          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[x].pageItems.length; i++){

                  alert(layers[x].pageItems[i].name);

              }

          }