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

How to select just the outermost path of Compound Path Shapes

Engaged ,
Nov 18, 2021 Nov 18, 2021

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
2.6K
Translate
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:

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;
}

 

Translate
Adobe
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:

Translate
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

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

Translate
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

 

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

 

Translate
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
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;
}

 

Translate
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