Tuesday, March 06, 2012

Select Compound Paths only

I got a request today to write a script that selects only compound paths. Here's the quickie script:

var doc=activeDocument;
var sel = doc.selection;

var len = sel.length;

        if(sel[len].typename ==="CompoundPathItem"){
alert("Only non-compound items are selected."); 

It should work for all versions of illustrator, and can easily be modified to other object types.



1 comment:

John said...
This comment has been removed by the author.