Mobile app version of vmapp.org
Login or Join
Hamm6457569

: How to reference a sublayer by name in an Illustrator script? How can one reference a sublayer in functions like setLayerVisibility, that accept layer names as arguments? I tried setLayerVisibility("MyLayerName.MySublayerName",

@Hamm6457569

Posted in: #AdobeIllustrator #IllustratorScripting #Layers

How can one reference a sublayer in functions like setLayerVisibility, that accept layer names as arguments?

I tried

setLayerVisibility("MyLayerName.MySublayerName", true)


, but that was ineffective.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamm6457569

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gonzalez368

the function may not be set up to look for sublayers, even if you pass the correct sublayer name. If it is, you can do something like...

var myLayer = app.activeDocument.layers["myLayerName"];
var mySublayer = myLayer.layers["mySublayerName"];

alert(mySublayer.name);

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme