How to select just the outermost path of Compound Path Shapes

Contributor ,
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

76

Likes

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

Contributor , Nov 18, 2021 Nov 18, 2021
I figured out an action...1. Select All2. Copy3. Lock4. Paste In Back5. Release Compound Path6. Pathfinder - Merge7. Swatches - Apply Swatch:

Likes

Translate

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

Likes

Translate

Translate
Contributor ,
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:

Likes

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 Community Professional ,
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? 

Likes

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

 

Likes

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

 

Likes

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