Mobile app version of vmapp.org
Login or Join
Eichhorn212

: How to switch the visibility setting of two layers in a single action in Illustrator? I am new to this forum and wanted to just say a quick hello before asking :) How do I switch the visibility

@Eichhorn212

Posted in: #AdobeIllustrator #HowTo #Layers

I am new to this forum and wanted to just say a quick hello before asking :)

How do I switch the visibility setting of two layers in Illustrator without having to either see both layers visible or none at all as the in-between step? Please see the attached images, hopefully clarifiying the issue.

Sorry if this is trivial, but it's been vexing me a lot!

Thanks

Viktor

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn212

1 Comments

Sorted by latest first Latest Oldest Best

 

@Cugini998

Well I have posted a script that could be easily repurposed for this function:
#target illustrator
// Cycle between layervisibility A - B - None - around
// CC BY SA Janne Ojala 2014

layers = app.activeDocument.layers
layer_a = layers.getByName("A") // insert layer names here
layer_b = layers.getByName("B")

if (! layer_a.visible && ! layer_b.visible){
layer_a.visible = true;
layer_b.visible = false;
} else if ( layer_a.visible && ! layer_b.visible){
layer_a.visible = false;
layer_b.visible = true;
} else {
layer_a.visible = false;
layer_b.visible = false;
}


This in general is the benefit of writing scripts when you have a few making the next one becomes easier, and easier. So scripting is one of the easiest ways to increase your personal worth.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme