3 Replies Latest reply on Sep 27, 2012 1:33 PM by W_J_T

    Delete elements by color

    jenoloo Level 1

      Hi All,

       

      I am wondering if anyone had any success creating a script that delete elements in Illustrator by its colors?

      For example, I want to delete all elements that is colored Red in a document regardless what layer or artboard thay are in.

       

      Thanks,

        • 1. Re: Delete elements by color
          CarlosCanto Adobe Community Professional & MVP

          you mean "Red" swatch?

           

          you'll have to loop thru each element and compare their color to the Red swatch color, if they match, remove.

          • 2. Re: Delete elements by color
            Muppet Mark Level 5

            You may be able to do that with just an action? ( I don't use them ). If you have CS6 then you may be able to script the same select/same fill color menu item… ( I don't have this ). I would have to loop the page items and test/remove…

            • 3. Re: Delete elements by color
              W_J_T Level 4

              As Muppet Mark stated you can use the Select Menu's options.

               

              - Select something

              - Select Menu > Same > Fill Color

              - Delete

               

              This will work across artboards, layers, groups, etc..

               

              I tried it with an action, but in order to use the Select Menu you have to select something, then that color will be linked to the action (which you may want if it's repetitive?). But otherwise you can use it without an action just by selecting something with the color you wish to target for selection and removal on a more manual basis, your not really loosing much in way of time, its only 3 clicks and a key stroke without an action. Better than manual selection of everything for sure. ;-)