loop through layers and determine if its a text containing layer


hi,

 

i trying loop/iterate through layers, determine if it's "text-layer", if is, set it's opacity 0.

 

this have far:

 

var iapp = new illustrator.application();

var openoptions = new illustrator.openoptions();

 

var idoc = iapp.open("c:\\myfile.pdf", illustrator.aidocumentcolorspace.aidocumentrgbcolor, openoptions);

 

illustrator.layer mainlayer = idoc.layers["layer 1"];

 

foreach (illustrator.groupitem groupitem in idoc.groupitems)
{
foreach (illustrator.groupitem item in groupitem.groupitems)
{
/* determine here if textlayer */
if( ... ) // (item.textframes.count > 0) perhaps?
{
item.opacity = 0;
}

//item.opacity = 15; //this indeed sets layer opacity 15
}

}

is vb? soloution need too?

 

 

#target illustrator  textlayersoff();  function textlayersoff() {            var doc = app.activedocument;            for ( var = 0; < doc.layers.length; i++ ) {                      if ( doc.layers[i].textframes.length > 0 ) { doc.layers[i].opacity = 0; };            };  }; 

 

this check text frames not content… if any



More discussions in Illustrator Scripting


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support