Setting color and other attributes to path items on existing layer in doc.
I want to set stroke color(existing spot swatch) and other attributes like overprint and stroke width to path items on a target layer("DIE") in the active document. What I have already sets what I want to all existing path items on all layers. I have tried ways to index the target layer "DIE" but can not seem to get it to work.
if(app.documents.length > 0 && app.activeDocument.pathItems.length > 0) {
var doc = app.activeDocument;
for (var i = 0; i < doc.pathItems.length; i++){
plotSet = doc.pathItems;
plotSet.filled = false;
plotSet.stroked = true;
plotSet.strokeWidth = 2;
plotSet.strokeOverprint = true;
plotSet.strokeColor = doc.swatches["PLOT"] .color;
}
}
