Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

1346458189 ('MARP') Error: Unlocking layers

$
0
0

Hi all,

 

I have a script that is used to tidy up a file before it is sent out. As a part of this i need to be able to unlock layers and make them visible, i have used this sample script that I have below without problems in the past but i am suddenly getting these errors, could someone please explain why?

 

function UnlockLayers(){

   

    // Loop through the docs layers and capture the locked states of each one.
                for ( var i = 0 ; i < app.activeDocument.layers.length; i++ ) {
                        // Unlock/Unhide layers here
                        app.activeDocument.layers[i].locked = false;
                        app.activeDocument.layers[i].visible = true;

                       

                }
}


Thanks to anyone that has any suggestions,

Tom


Viewing all articles
Browse latest Browse all 12845


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>