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

Selecting pathItems with a Gradient

$
0
0

Hey Guys,

 

I'm trying to get a script together that finds pathItems with gradient fill color tpyes and select them. So far I've gotten as far as being ble to go through a document and identify all the pathItems with gradients, but I can't find a good weay to select JUST them.

 

If anyone thinks of something I'd be greatful.

Here's what I have so far.

 

 

#target illustrator
var doc = app.activeDocument
ipath(doc) 
function ipath(doc){    for(i=0;doc.pathItems.length>i;i++) if(doc.pathItems[i].fillColor.typename == 'GradientColor'){  alert("it's a Gradient")     }    }

Viewing all articles
Browse latest Browse all 12845

Trending Articles