0 Replies Latest reply on Apr 22, 2014 10:33 AM by dancemantron

    How to select multiple pathPoints?

    dancemantron Level 1


               i'm getting conflicting answers for wether its possible to select pathPoints at all, but could anyone please describe how to select multiple pathPoints?, if its possible.


      I've had some success by writing a simple script that accesses pathPoints then aligns them with the manually chosen, highest point (highest Y value):


      var firstPath           = app.activeDocument.pathItems[1];                                    

      var countOfPoints = firstPath.pathPoints.length;

      var index               = 0;                                                                                  


      for(index=0; index<=countOfPoints; index++)


      var currentPoint        = firstPath.pathPoints[index];                                               

      currentAnchorList     = currentPoint.anchor;

      TopY                         = app.activeDocument.pathItems[1].pathPoints[0].anchor[1];

      currentPoint.anchor = Array(currentAnchorList[0],TopY);                                   



      ...it works but is not finished.

      It shows however that existing pathPoints can be edited/manipulated in almost every way, except there does NOT appear to be any way to perform the simpler task of selecting pathPoints or anchor points?


      The closest i've found is: ..pathItems.selected = true;  ..but this does Not work when applied to pathPoints\Anchors, IE:


      app.activeDocument.pathItems[1].pathPoints[index].anchor.selected = true;   ..AND,..

      app.activeDocument.pathItems[1].pathPoints[index].selected = true;


      ...both fail to select any points.


      1) please reply if you know how to select pathPoints and\or anchor points?, and\or have any alternative suggestions\instructions.

      thanks much for any assistance,.