Skip to main content
Participant
September 29, 2016
Answered

Make a work path from selection

  • September 29, 2016
  • 4 replies
  • 2967 views

Hi, I'm trying to figure out how to make a work path from a selection, I'm using a small script to test it out on, where I have a test file that has a selection made. I need to make it a work path (and eventually a clipping path) but I can't seem to do it

I'm working in applescript but I'm not adverse to adding in a bit of java as a variable

can someone make this work?

Cheers

                    tell application "Adobe Photoshop CC 2014"

                    

                                tell current document

                                               make work path with selection

                                end tell

                              end tell

This topic has been closed for replies.
Correct answer greenrookie

In Applescript:

tell application "Adobe Photoshop CC 2014"

              tell current document

                             tell selection

                                           make work path tolerance 2 #in pixels

                             end tell

                             set workPath to path item "Work Path"

                             set name of workPath to "Path 1"

                             tell path item 1

                                           make clipping path flatness 2

                                           deselect

                             end tell

              end tell

end tell

4 replies

greenrookieCorrect answer
Inspiring
September 30, 2016

In Applescript:

tell application "Adobe Photoshop CC 2014"

              tell current document

                             tell selection

                                           make work path tolerance 2 #in pixels

                             end tell

                             set workPath to path item "Work Path"

                             set name of workPath to "Path 1"

                             tell path item 1

                                           make clipping path flatness 2

                                           deselect

                             end tell

              end tell

end tell

alsop89Author
Participant
September 30, 2016

You absolute champ!

natrev
Legend
September 30, 2016

Hi,

Try this..

// Work path Tolerance set

app.activeDocument.selection.makeWorkPath(0.5);

// Clipping path flatness set

var pathitem=app.activeDocument.pathItems.getByName ('Work Path');

pathitem.name="Path 1";

app.activeDocument.pathItems[0].makeClippingPath(0.2);

pathitem.deselect();

-yajiv

Inspiring
September 30, 2016

In Applescript:

tell application " Adobe Photoshop CC 2014"

           tell current document

                      tell selection

                                 make work path tolerance 2 # tolerance in pixels

                      end tell

           end tell

end tell

SuperMerlin
Inspiring
September 29, 2016

In javaScript:-

app.activeDocument.selection.makeWorkPath();