• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Script for Selecting Open Paths in Illustrator CS6

New Here ,
Jul 10, 2012 Jul 10, 2012

Copy link to clipboard

Copied

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");
}
TOPICS
Scripting

Views

17.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Explorer ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

How do you do this on a mac? Or maybe I should say, what app should I use to create this? The Text Edit App won't let me save this  file. I can change the extension afterwords but no go.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

Copy the above and paste into the text editor of your choice. Force the text to plain text (not RTF; in TextEdit use as below). Save it as above.

Screen shot 2012-08-03 at 9.33.03 AM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

So it needs to be a txt extension, not js?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

LATEST

Ah, got it. I opened the renamed file in the Javascript Console, pasted your file and renamed it to jsx. Then in the app, I found it under File>Scripts rather than Select>object where former plugins were located.

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines