Answered
Javascript to Unlock All Layers
I can't seem to find a simple javascript to "Unlock All Layers" for illustrator.
I just want to litterally unlock all layers 🙂
Any help out there?
I can't seem to find a simple javascript to "Unlock All Layers" for illustrator.
I just want to litterally unlock all layers 🙂
Any help out there?
Hi,
Please try following snippet to unlock all layers and sublayers in Illustartor
function unlockLayers(_layers) {
for (var i = 0; i < _layers.length; i++) {
if (_layers[i].locked) {
_layers[i].locked = false;
}
if (_layers[i].layers.length)
unlockLayers(_layers[i].layers);
}
}
unlockLayers(app.activeDocument.layers);
Let us know if this helps
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.