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

Script to show/hide certain layers for all open documents

Community Beginner ,
Jul 05, 2023 Jul 05, 2023

Is it possible to have a script that would show one layer and hide another layer (same name in all docs) in all documents that are open? 

TOPICS
Scripting
336
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

correct answers 1 Correct answer

Advisor , Jul 05, 2023 Jul 05, 2023

Hello @SparrowInkDesign 

You will need to fill in the layer names in the snippet below.

 

app.documents.everyItem().layers.itemByName("Layer Name to Show").visible = true;
app.documents.everyItem().layers.itemByName("Layer Name to Hide").visible = false;

 

Regards,

Mike

Translate
Advisor ,
Jul 05, 2023 Jul 05, 2023

Hello @SparrowInkDesign 

You will need to fill in the layer names in the snippet below.

 

app.documents.everyItem().layers.itemByName("Layer Name to Show").visible = true;
app.documents.everyItem().layers.itemByName("Layer Name to Hide").visible = false;

 

Regards,

Mike

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
Community Beginner ,
Jul 05, 2023 Jul 05, 2023
LATEST

Thank you Mike! Super helpful!

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