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

Script to show/hide certain layers for all open documents

Community Beginner ,
Jul 05, 2023 Jul 05, 2023

Copy link to clipboard

Copied

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

Views

214
Translate

Report

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

Votes

Translate
Advisor ,
Jul 05, 2023 Jul 05, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thank you Mike! Super helpful!

Votes

Translate

Report

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