I can easily acess a graphic's layer option by using the following:
var doc = app.activeDocument.allGraphics;
doc.graphicLayerOptions.graphicLayers.itemByName( "Orange").currentVisibility = true;
Instead of "doc", I would like to grab the graphic by the name/label it has as a item in the layers menu: "Bee".
var test = app.activeDocument.pageItems.item("Bee");
I get confused, as one is a pageItem and the other a graphic and I'm not good enough in scipting to understand the whole hirachy.
Can someone help?
name in layers palette is always a reference to a page item.
Assuming only one image / graphic in it you can access it by
var test = app.activeDocument.pageItems.itemByName("Bee").graphics;
if I try this:
app.activeDocument.pageItems.itemByName("Bee").graphics.graphicLayerOptions.graphicLaye rs.item("Orange").currentVisibility = true;
ID tells me that graphics does not support this method or properties.
Is my thinking wrong?