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
                    }

                }

this forum c++ sdk -- think you'd have more luck posting in scripting forum:

 

http://forums.adobe.com/community/illustrator/illustrator_scripting

 

good luck!



More discussions in Illustrator SDK


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