: 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
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
More posts by @Eichhorn212
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.