Skip to main content
SparrowInkDesign
Participating Frequently
July 5, 2023
Answered

Script to show/hide certain layers for all open documents

  • July 5, 2023
  • 2 replies
  • 327 views

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? 

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Mike Bro

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

2 replies

Mike BroCorrect answer
Legend
July 5, 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

SparrowInkDesign
Participating Frequently
July 5, 2023

Thank you Mike! Super helpful!