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

Create a Compound Shape and intersect shape area

Guru ,
Mar 17, 2019 Mar 17, 2019

Copy link to clipboard

Copied

How can one by script "Create a Compound Shape and intersect shape area" ?

2019-03-17_09-57-04.png

I couldn't find the menu command?

TOPICS
Scripting

Views

2.3K

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

Valorous Hero , Mar 17, 2019 Mar 17, 2019

We've got to use actions or menu commands.

The pathfinder operations are recordable, but you can also use the menu commands on paths which you have to first ensure are in a group. Then apply a pathfinder EFFECT from the menu commands and follow up with "Expand Style" menu command to destructively fix the changes in place.

Thanks to Ten A​ and his new intuitively-compiled catalogue of execute menu command strings, this block is our dictionary for pathfinder commands to be used with the app.executeM

...

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 17, 2019 Mar 17, 2019

Copy link to clipboard

Copied

The only thing that I know:

app.executeMenuCommand ("compoundPath"); // opposite: app.executeMenuCommand ("noCompoundPath");

It's the same as

menu: Object --> Compound Path --> Make

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
Valorous Hero ,
Mar 17, 2019 Mar 17, 2019

Copy link to clipboard

Copied

We've got to use actions or menu commands.

The pathfinder operations are recordable, but you can also use the menu commands on paths which you have to first ensure are in a group. Then apply a pathfinder EFFECT from the menu commands and follow up with "Expand Style" menu command to destructively fix the changes in place.

Thanks to Ten A​ and his new intuitively-compiled catalogue of execute menu command strings, this block is our dictionary for pathfinder commands to be used with the app.executeMenuCommand() function.

Beware though, as I have discovered some inconsistencies with expectation/reality when it comes to using the menu commands as alternatives to comparable scripting methods or actions. They are not easy to describe, but once you come across a few examples you can generally get the idea.

For example, having a placed item selected and going "Edit Original" can open the file but waits to do so after the script has been ran - while the app.open command does it in sync.

In the context of your usage though, I believe it has been proven to work just fine on these forums for years now.

This is [ANN] Adding AiMenu class.​ from Ten A​

"pathfinder" : {
"add" : "Live Pathfinder Add",
"intersect" : "Live Pathfinder Intersect",
"exclude" : "Live Pathfinder Exclude",
"subtract" : "Live Pathfinder Subtract",
"minusBack" : "Live Pathfinder Minus Back",
"divide" : "Live Pathfinder Divide",
"trim" : "Live Pathfinder Trim",
"merge" : "Live Pathfinder Merge",
"crop" : "Live Pathfinder Crop",
"outline" : "Live Pathfinder Outline",
"hardMix" : "Live Pathfinder Hard Mix",
"softMix" : "Live Pathfinder Soft Mix",
"trap" : "Live Pathfinder Trap"
},

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
Guru ,
Mar 17, 2019 Mar 17, 2019

Copy link to clipboard

Copied

Thanks guys

I couldn't find the menu item. I had looked both through Ten's aiMenu and the SDKs executeMenuCommands string list and couldn't find the command for "Create a Compound Shape and intersect shape area" I look particularly at the the pathfinder items and couldn't find compound shape ones other than the make and release which didn't help.

The action recording works well and I can't think why I didn't think of it.

2019-03-17_19-04-12.png

The app.executeMenuCommand() problems  link is very interesting. I am finding that it fails in the color convert about 1 in 20 times.

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
Guru ,
Mar 17, 2019 Mar 17, 2019

Copy link to clipboard

Copied

LATEST

I'm just putting this link hear as a reminder to myself where to find the AIMenuCommandString.h file in the SDK, It's under File list > AIMenuCommandString.h

Here's a link to an online version (2015) updated one is in the SDK

Bloks/AIMenuCommandString.h at master · WestonThayer/Bloks · GitHub

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