3 Replies Latest reply on Nov 20, 2014 10:07 AM by jugganaut

    How to get item count of layer?

    jugganaut

      I have a script that creates a certain number of rectangles based on an incoming filename.  It may be one box, it could be 5.  The script places these rectangles on page 2 (myPage2) on a layer named "Icons".  There are other elements on myPage2 that I do not want to count, hence putting them on their own layer.

       

      How can I get a count of items on this layer?  I've tried:

       

      var myCount = myDocument.layer.count("Icons");
      

       

      This does not return the correct value.

       

      stuck.