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

How to select just the outermost path of Compound Path Shapes

Engaged ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

Hello,

Currently I am using the Group Selection Tool to select the outermost path of my vector art.  Is there a way via a script or something that would allow me to do this faster and easier.  Currently I am having to do this on a file with 89 vector shapes, so I am really hoping someone out there has a solution for me.

 

Thank you in Advance!

 

TOPICS
Scripting

Views

573

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

correct answers 2 Correct answers

Engaged , Nov 18, 2021 Nov 18, 2021

I figured out an action...

1. Select All

2. Copy

3. Lock

4. Paste In Back

5. Release Compound Path

6. Pathfinder - Merge

7. Swatches - Apply Swatch:

Votes

Translate

Translate
Guide , Nov 18, 2021 Nov 18, 2021

 

app.selection = null;
var compPaths = app.activeDocument.compoundPathItems;
for (var i = 0; i < compPaths.length; i++) {
    compPaths[i].pathItems[0].selected = true;
}

 

Votes

Translate

Translate
Adobe
Engaged ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

I figured out an action...

1. Select All

2. Copy

3. Lock

4. Paste In Back

5. Release Compound Path

6. Pathfinder - Merge

7. Swatches - Apply Swatch:

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 ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

You can try "Select" and "Objects" option under Select menu. But I think it depends on artwork. Can you share a screenshot? 

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
Guide ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

 

app.selection = null;
var compPaths = app.activeDocument.compoundPathItems;
for (var i = 0; i < compPaths.length; i++) {
    compPaths[i].pathItems[0].selected = true;
}

 

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
Engaged ,
Nov 18, 2021 Nov 18, 2021

Copy link to clipboard

Copied

LATEST

@femkeblanco I had to make 1 tweak to your code but it did the trick of selecting the outer paths.

compPaths[i].pathItems[1].selected = true;

app.selection = null;
var compPaths = app.activeDocument.compoundPathItems;
for (var i = 0; i < compPaths.length; i++) {
    compPaths[i].pathItems[1].selected = true;
}

 

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