app.selectTool('Adobe Intertwine Zone Marker Tool') does not work
When I run the following script, the Adobe Intertwine Zone Marker Tool starts up and I can select the area where I want to change the overlap like the lasso tool. However, nothing happens after the selection.
app.selectTool('Adobe Intertwine Zone Marker Tool')
The overlap of the selected area is changed.
The line will remain as if it was drawn with the lasso tool. The overlap is not changed.
- macOS 11.7
- Illustrator 27.1.1
An intended way of picking up the hidden Zone Marker tool via a script is to enter the Intertwine mode using these commands:
app.executeMenuCommand('Partial Rearrange Make') — when an intertwine object is not created yet, and
app.executeMenuCommand('Partial Rearrange Edit') — when the object already exists, as per comments by the OP.
Thanks for your action, Egor.
You are correct, the tool gets picked automatically once the mode is entered.
Since the discussion in fact is pretty useful for those who might search for it, I will rather mark it as 'Resolved' and quote you in the status.
It works for me.
app.executeMenuCommand('Partial Rearrange Edit')
In that case, there is no need to run selectTool, since the necessary results are obtained when edit is called. app.selectTool('Adobe Intertwine Zone Marker Tool') loses its raison d'être.
It is merely reporting information that may be a bug (found while trying out the script). If you decide that there is no need to fix it, you can set the status to "Rejected".
Mer, the same applies to making edits into an intertwine.
You have to call for the Edit command and then call the hidden tool.
This is an intended way, the developer says, and not a workaround.
Please confirm it works for you.
If I run it with an already generated intertwine object selected, the result is the same.
It is true that the menu is an alternative. I would add.
app.executeMenuCommand('Partial Rearrange Make')
I guess the correct way of using this would be to create an intertwine object first and only then to call a specific hidden tool that is designed to work with intertwines only.
Remember that you can create one with the menu command and not specify zones at all, and it still will be a valid intertwine object.
So it's not a tool that creates it, but a separate command you forgot to call.