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

Illustator - select pathItems based on fill color

$
0
0

I am seeking a vbscript to select all pathItems based on its fillcolor.  Here's what I have but obviously wrong but I think I am on the right "path", ha!  I can't figure out how to say "if the pathitems fill color match my fillcolor, then select it and move on to the next"

 

Here's what I have:

 

Set FSO = CreateObject("Scripting.FileSystemObject")

Set App = CreateObject("Illustrator.Application")

Set SourceFolder = FSO.GetFolder("C:\SOCAL\Section_31\LandCover")

Set FillColor = CreateObject("Illustrator.RGBColor")

     FillColor.Red = 28

     FillColor.Green = 99

     FillColor.Blue = 48

 

If (App.Documents.Count > 0) Then

        Set DocPathItems = App.ActiveDocument.PathItems

        If (DocPathItems.Count > 0) Then

            For Each CurrentPath in DocPathItems

               If CurrentPath.PathItems = FillColor Then

                    CurrentPath.Selected = True

              Else

              End If

          Next

       End If

End If


Viewing all articles
Browse latest Browse all 12845

Trending Articles



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