This content has been marked as final.
Show 5 replies
-
1. Re: Object Layer Options, change for all AI links?
-hans- Feb 18, 2013 1:37 PM (in response to steffenunger)Hi,
not as fine but try this:
var input = ['Ebene 1', 'Ebene 2']/*Names of Layers to switch on or off*/, onOrOff = false/*true = visible, false = not visible*/; var currDocGraphics = app.activeDocument.allGraphics; l = currDocGraphics.length; while(l--){ currImage = currDocGraphics[l]; if(currImage.imageTypeName == 'Adobe PDF'){ i = input.length; while(i--){ try{ currImage.graphicLayerOptions.graphicLayers.itemByName(input[i]).currentVisibility = onOrOff; } catch (e){ } } } }No GUI today ;-)
-
2. Re: Object Layer Options, change for all AI links?
steffenunger Feb 19, 2013 7:34 AM (in response to -hans-)Hi, sorry, but I am still new to scripting. I copy and paste into ExtendScript Toolkit, save as .js but nothing happens when I run the script in ID. What am I doing wrong?
Thanks
-
3. Re: Object Layer Options, change for all AI links?
-hans- Feb 19, 2013 11:07 AM (in response to steffenunger)Hi,
until now the script does not have a GUI. So you have to set your choice in the first scriptline.
var input = ['layerName01', 'layerName02', 'add as many layers as you want', '...', 'and so on']/*Names of Layers to switch on or off*/, onOrOff = false/*true = visible, false = not visible*/;
-
4. Re: Object Layer Options, change for all AI links?
steffenunger Feb 21, 2013 12:01 PM (in response to -hans-)Got it! I saved a series of scripts for the layers I need, with an ON and and an OFF version for each. Thanks so much! Vielen Dank!
-
5. Re: Object Layer Options, change for all AI links?
-hans- Feb 22, 2013 12:03 AM (in response to steffenunger)dafür nich' ;-)

