Copy link to clipboard
Copied
Hi All,
I have been looking all over to see if I could find anything on jsx script to access the pathfinder tool. I have a script that is adding text in a font that is "single line", really it is a closed compoundpath after outlined. I can use the outline option from the pathfinder tool which deletes the redudant points, but have not found a way to do so from a script. Trying to avoid having the user do this step manually.
I have already tried the Live Pathfinder Outline, but this is exectuing the menu command which has a different behavior than the tool. I do note understand why that is but unimportant in this context.
1 Correct answer
I see, try recording an Action to apply the path finder, then have the script play the action.
Explore related tutorials & articles
Copy link to clipboard
Copied
Live Pahtfinder Outline applies an Effect, you have to Expand Appearance to get the same results as the pathfinder tool.
app.executeMenuCommand('expandStyle');
by the way, the number of points remained the same when I used the tool manually in the test I made.
Copy link to clipboard
Copied
See thread delete-remove-duplicate-paths I am following the steps from the second to last comment from the bottom, from Lizzzzahhh.
If I use the Pathfinder palette it works. It is an outlined text that is closed shape, but it is a single line font so the paths and point are directly on top of eachother. After the steps mentioned above, the duplicates are removed.
If I use the menu Effect > Pathfinder > Outline and then expand appearance it does not work. I am still left with duplicate 1-to-1 paths and points. If you draw a rectangle and then copy it in front, then select both and use the palette to do Outline does it not removed the second path? I tried this as well and I was left with one rectangle path.
Copy link to clipboard
Copied
I see, try recording an Action to apply the path finder, then have the script play the action.
Copy link to clipboard
Copied
That did the trick, thanks. Was able to use another post by Silly-V to write the action from a string to a file, load, run, and unload.
Where do you all find some of this stuff? I swear its like the documentation has a secret menu. Like the executeMenuCommand I found a couple of years ago, but still have never seen it in any of the official documentation. Unless I am not looking hard enough.
Copy link to clipboard
Copied
I hear you, executeMenuCommand and writing/updating Actions is not in the official documentation. Those are contributions from the great members of this forum.
hmm...I should put together an unofficial Scripting Reference.
....don't hold your breath though 🙂

