4 Replies Latest reply: Aug 3, 2012 9:53 AM by TekART RSS

    Script for Selecting Open Paths in Illustrator CS6

    cutarica.john Community Member

      I have created this script for selecting open paths in illustrator cs6 as the graffix plugin is not working under CS6.

       

      Just save the following text in /Applications/Adobe Illustrator CS6/Presets/en_US/Scripts/Select Open Paths.js

       

       

      if (documents.length > 0 && activeDocument.pathItems.length > 0){
       
                var allPaths = activeDocument.pathItems;
                var allPathsCount = allPaths.length;
                var openPathsAreLocked = false;
                var lockedOpenPaths = 0;
                var locked = false;
                for (var i=0; i < allPathsCount; i++){
                          allPaths[ i ].selected = false;
       
                          if( ! allPaths[ i ].closed){
       
                                    try{
                                              allPaths[ i ].selected = true;
                                    } catch (e) {
                                              openPathsAreLocked = true;
                                              lockedOpenPaths++;
                                    }
       
                          }
                }
                if (openPathsAreLocked) alert (lockedOpenPaths + " open paths are locked or hidden (or their layer is locked or hidden) and cannot be selected");
      }