1 Reply Latest reply on Mar 5, 2010 8:44 AM by Shonkyin

    Copy particular layer items

    Techi Panda Level 2

      Hi scripts

       

      I have A-Tx master page in my document and also 3 layers in the master page. Now I want to copy all the items placed in layer 1 how can i do this using javascript?

       

      something i worked

       

      myl1 = app.activeDocument.layers.item("lay1");

      app.select(myl1.allPageItems);

       

      but i am not getting any result?

       

      thanks in advance

       

      regards

      a r u l

        • 1. Re: Copy particular layer items
          Shonkyin Level 3

          Arul,

           

          You can't select all items of one layer if your layer items appear more than one page.

           

          Try to selecte one by one item for e.g.

           

          myl1uitems = app.activeDocument.layers.item(0).allPageItems;

          for (a=0; a<myl1uitems.length; a++)

          {

          app.select(myl1uitems[a]);

          alert ("You have selected " + myl1uitems[a].constructor.name)

          }

          Shonky