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

No Stroke No Fill not recognizing

$
0
0

Can someone tell me why my else if statement isn't working? I know I have 3 path items that have no fill and no stroke...

#target illustrator
var allDocs = app.documents;
var doc = app.activeDocument;
var allLayers = doc.layers;
var allLines = doc.pathItems;
var counter = 0;
for (var i = 0; i < allLines.length; i++) {    if (allLines[i].layer == "[Layer Tables]") {        if (allLines[i].stroked == true) {            counter++;            allLines[i].remove();        } else if (allLines[i].stroked == false && allLines[i].filled == false) {            counter++;            allLines[i].remove();        }    }
}
alert(counter + " items removed");

 

Adobe Illustrator CS4 Windows 64 Bit JavaScript


Viewing all articles
Browse latest Browse all 12845

Trending Articles