Javascript to check particular layer is available in the Artwork or not
Hello Everyone,
Currently, I am using the script to hide the Layer "TB" and lock all layers in the active document:
var document = app.activeDocument;
document.activeLayer = document.layers["TB"]
document.activeLayer.visible = false;
var lc = document.layers.length;
for (var i=1; i<=lc; i++) {
document.layers[i-1].locked = true;
}
But in some cases, my document doesnot have the "TB " layer, in that case i need to skip this step and need to run further.
Please give your inputs to overcome this.
