Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Copy particular layer items

Participant ,
Mar 05, 2010 Mar 05, 2010

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

TOPICS
Scripting
465
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2010 Mar 05, 2010
LATEST

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);

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

}

Shonky

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines