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

Trying to delete everything without a stoke or fill

$
0
0

var doc = app.activeDocument;


for(var i=doc.pathItems.length-1; i>-1; i--){

 

if(pathItem.filled==false && pathItem.stroked==false)    //I think this is where the error is

{

  alert("Found "+pathItem);

  doc.pathItems[i].remove()

}

}

 

 

So I am trying to find everything that does not have a stoke or fill and then delete it. I used this as a reference Finding pathItems that have no fill and no stroke Not sure what I did wrong I am new to javascript. Any help would be great I've been at this all day and it is very frustrating lol. I have CS6.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



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