Copy link to clipboard
Copied
I am trying to make an action that has many steps. One of the steps is a Menu Item which is Effect > Path > Path Offset. When I execute the the action, Path Offset window pops up and wait for me to enter values (Offset, Joins). I enter Offset: 0.1 mm, Joins: Round then I click Ok for the action to continue. I am looking for a way to set these values automatically so the action continues without me entering the same values every time.
I think this has two routes to solve. I should either add a script to implement a series of keystrokes right after the Path Offset menu item, in my case the key strokes in order should be "0.1 mm > tab > downarrow > enter". These key strokes will set Offset: 0.1 mm, Joins: Round and then click Ok.
Or, I should implement the Path Offset command with the desired values via calling Path Offset function in a script.
Would you please help me with this. Is this something doable? Thank you in advance.
1 Correct answer
This snippet will apply an offset effect with the parameters you specified to a selected path.
var string = '<LiveEffect name="Adobe Offset Path">' +
'<Dict data="I jntp 0 R mlim 4 R ofst 0.283"/>' +
'</LiveEffect>';
app.selection[0].applyEffect(string);
Explore related tutorials & articles
Copy link to clipboard
Copied
just did a quick test. double check whether the dialog option is turned on or not
there will either be an empty box (its off) or the square next to the check mark is filled with a little icon
Copy link to clipboard
Copied
In Action menu, I can't see the options of the Offset Path. There is also no drop down menu for me to choose from. I am not sure what Dialog is. Is it the Offset Path window? I can only toggle Dialog for the whole action. I've toggled it on and off but nothing changed. Am I missing something here?
Copy link to clipboard
Copied
instead of using effect - path - offset. go to object - path - offset and see if that still does what you want
also from your screenshot. the square box next to the "offset outside path" down arrow and checkbox. click that to remove the dialog interactions
Copy link to clipboard
Copied
Unfortunately, object - path - offset doesn't work for me because it generates double lines. I also clicked the square box to remove the dialog interactions but it didn't work.
Copy link to clipboard
Copied
object - path - offset may work for me if I find a way to delete the original path after doing the offset.
Copy link to clipboard
Copied
you can do this. when you do the object offset path. it will generate the new path below the current object. there is a command to select the object above/below. you can find this command via select then "next object above" and below, so you can create an action like this
Copy link to clipboard
Copied
It is a good idea, but I usually work with multiple paths at the same time. Next Object Above works if I choose one path only.
Copy link to clipboard
Copied
I've just read that toggle dialog doesn't work with Insert Menu Items.
Copy link to clipboard
Copied
This snippet will apply an offset effect with the parameters you specified to a selected path.
var string = '<LiveEffect name="Adobe Offset Path">' +
'<Dict data="I jntp 0 R mlim 4 R ofst 0.283"/>' +
'</LiveEffect>';
app.selection[0].applyEffect(string);
Copy link to clipboard
Copied
That worked!! Thank you so much! Would you please explain the parameters inside in case I wanted to change the offset and joins.
Copy link to clipboard
Copied
Can you please add your further requests in the original thread?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Not necessary to edit your thread. Just continue to ask further questions here:
Fast way or a script to offset only the outside path of a compound path
Copy link to clipboard
Copied
- "jntp" is the join type of 0 (0 round, 1 bevel and 2 miter).
- "mlim" is the miter limit of 4.
- "ofst" is the offset of 0.283 points (or 0.1 mm); this can be a negative value.
Copy link to clipboard
Copied
I also may need to apply a negative offset, how can I apply that to the string?
Copy link to clipboard
Copied
In case this is related to your other request, I've added two alternative approaches there.
Fast way or a script to offset only the outside path of a compound path

