Turn on layer visibility without exact name


hi all,

 

this first post, , first attempt edit javascript ai, please bear me! realtively actionscript, trying hand @ streamline our image exporting process. using cs5 on pc.

 

we build our illustrator files combination of different layers. 1 layer exported @ time, , layers combined form more complex image. use layer names instructions of layers should on , off.

 

an example of layer naming might this:

 

03 (01-on, 02-off)

02 (01-off)

01

 

i have been able figure out how check if there note turn layer on, question how select layer turn on visibility without using exact name of layer?

 

in example, when layer 3 gets exported, should have layer "01" visible , layer "02 (01-off)" not visible. since our files constructed differently (meaning 02 might not have note 01 being off), can't use getbyname option because don't have exact name call layer , turn visibility on. layers start 01, 02, 03, etc. there way use getbyname , have @ first 2 characters of layer name?

 

thanks in advance help!

use index property, in example, if need turn layer 2 off use,

 

activedocument.layers[1].visible = false; 

 

zero based indexes layers, top being zero.



More discussions in Illustrator Scripting


adobe

Comments

Popular posts from this blog

CS6でファイルが開けません

Trouble Viewing Adobe and Modern Mode

Scrollability in divs or text boxes