5 Replies Latest reply on Sep 30, 2016 12:09 AM by alsop89

    Make a work path from selection

    alsop89 Level 1

      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

       

       

        • 1. Re: Make a work path from selection
          SuperMerlin Level 5

          In javaScript:-

          app.activeDocument.selection.makeWorkPath();

          2 people found this helpful
          • 2. Re: Make a work path from selection
            greenrookie Level 3

            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

            • 3. Re: Make a work path from selection
              natrev Level 3

              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

              • 4. Re: Make a work path from selection
                greenrookie Level 3

                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

                • 5. Re: Make a work path from selection
                  alsop89 Level 1

                  You absolute champ!