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

Pathfinder trim

Participant ,
Apr 09, 2022 Apr 09, 2022

Copy link to clipboard

Copied

Hi

I want to "Pathfinder Trim" the selected groups with a Script.

But

app.executeMenuCommand("Live Pathfinder Trim");
app.executeMenuCommand("expandStyle");
does nothing.
When I do it manually via the pathfinder palette (see below), then it works.
__Alain___0-1649535356449.png
 
When I do it manually via Effects > Pathfinder > Trim, then "Execute new effect" (see below) then nothing happens.
__Alain___1-1649535467940.png

 

__Alain___2-1649535509123.png

 

From my understanding but both manual methods should do the same or am I wrong?
How can I "Pathfinder Trim" (like via the pathfinder palette) the selected groups by Script?

 

Kind regards
Alain
 
Sources:
 
TOPICS
Scripting

Views

693

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 1 Correct answer

Participant , Apr 24, 2022 Apr 24, 2022

Found a workaround 🙂

First I merge all pathItems (triangles) of one Layer to ONE pathItem, then "selectall" > "group" > "trim" > "expand style" > "ungroup".

Votes

Translate

Translate
Adobe
Guide ,
Apr 09, 2022 Apr 09, 2022

Copy link to clipboard

Copied

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
Participant ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

I already tried with 

  app.executeMenuCommand("group");
  app.executeMenuCommand("Live Pathfinder Trim");
  app.executeMenuCommand("expandStyle");
  app.executeMenuCommand("ungroup");

But since I already have groups and triming them "manually" did work,

I supposed that it also would work by script without grouping the groups.

When I do it like this, then all the groups get lost. But I need to keep the shape which is defined by the path-elements in the group.

 

Result doing trim manually (each group of paths after trim is a unique path or compoundpath):

__Alain___0-1649867784696.png

 

Result doing trim by script (grouping groups first):

__Alain___1-1649867858850.png

In the attachment you find the original file.

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
Participant ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

Why can't I upload an ai-File here?

Filetype is allowed (see below), but when I post the post then it gets removed.

__Alain___2-1649868510142.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
Guide ,
Apr 13, 2022 Apr 13, 2022

Copy link to clipboard

Copied

You can't upload ai files here (I don't know why).  You can upload the file to a file sharing site and post the link here. 

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
Participant ,
Apr 24, 2022 Apr 24, 2022

Copy link to clipboard

Copied

Found a workaround 🙂

First I merge all pathItems (triangles) of one Layer to ONE pathItem, then "selectall" > "group" > "trim" > "expand style" > "ungroup".

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
Advocate ,
Jul 13, 2023 Jul 13, 2023

Copy link to clipboard

Copied

If I'm correct the script will return pluginItem for item created with live pathfinder, right?

Do you know perhaps how to make sure the item is actually a live Pathfinder item. A pluginItem can be many things. I'm updating a script which returns area's from shapes. But it gives me errors on these live Pathfinder items 

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
Participant ,
Jul 14, 2023 Jul 14, 2023

Copy link to clipboard

Copied

Do you mean pathItem instead of pluginItem (I dont know what a pluginItem is😅).

And I do not really know what a Live Pathfinder item is from a coding view.

Did you ask Chat GPT already?

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
Advocate ,
Jul 15, 2023 Jul 15, 2023

Copy link to clipboard

Copied

LATEST

By live pathfinder item, I meant while holding alt with 2 shapes. Certainly n vommands will do the operation but you keep both shapes intact. So in my case, I use the subtract. When I use 2 circles l, one half overlaying the other, you get this halfmoon shaped bite out of the other. But because we press alt, the one doing Ng the cutting is still a a full circle. That's why I called it it live pathfinder item.

 

A pluginItem, can be a couple things. When you do certain operations, the type name of that shape, changee to pluginItem. Even though in the layer panel, we can still see it name as either path or compoundpathItrm. It's a bit weird. Never knew this until this week.

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