-
1. Re: Path Points Anchors Selection
CarlosCanto Oct 31, 2012 3:39 PM (in response to W_J_T)you mean "selection", as in pathItems or the actual selected path points?
-
2. Re: Path Points Anchors Selection
W_J_T Oct 31, 2012 3:55 PM (in response to CarlosCanto)Hi CarlosCanto, thanks for responding, I really appreciate it.
Yes: "the actual selected path points". Similar to how you would using the direct selection tool for selecting certain points, can they be selected individually as such via code?
-
3. Re: Path Points Anchors Selection
CarlosCanto Oct 31, 2012 4:17 PM (in response to W_J_T)yes, here I selected the second anchor of the the top most path item
var idoc = app.activeDocument; var ipath = idoc.pathItems[0]; var pp = ipath.pathPoints; pp[1].selected = PathPointSelection.ANCHORPOINT;
-
4. Re: Path Points Anchors Selection
W_J_T Nov 1, 2012 8:42 AM (in response to CarlosCanto)Great! Thanks so much for responding CarlosCanto, I was playing around with some of that before I posted but couldn't seem to get it right, your snippet really helped me, thanks so much!
Is it possible to get the length of pathPoints for each pathItems? Since each path can contain different numbers I cant seem to understand how to know the max for each path so I don't get "Index out of bounds" on some?
Thanks again CarlosCanto for all your assistance.
-
5. Re: Path Points Anchors Selection
CarlosCanto Nov 1, 2012 8:54 AM (in response to W_J_T)hi use
var ppCount = ipath.pathPoints.length;
-
6. Re: Path Points Anchors Selection
W_J_T Nov 1, 2012 9:27 AM (in response to CarlosCanto)Hi CarlosCanto, thanks again for responding, I had tried that previously but after you posted that I tried again and used: "ipath.pathPoints.length-1;" in order to get rid of the "Index out of bounds" error, it seems to work but is -1 correct/needed?
-
7. Re: Path Points Anchors Selection
CarlosCanto Nov 1, 2012 9:48 AM (in response to W_J_T)yes, it is needed, to select the last anchor point use
var ppCount = ipath.pathPoints.length; pp[ppCount-1].selected = PathPointSelection.ANCHORPOINT;
-
8. Re: Path Points Anchors Selection
W_J_T Nov 1, 2012 10:16 AM (in response to CarlosCanto)Great, thanks CarlosCanto for confirming that. You got me on the right track and helped me get to where I wanted to go. Thanks so much for your continued help and assistance, wonderful as always. Thanks again.
-
9. Re: Path Points Anchors Selection
CarlosCanto Nov 1, 2012 11:07 AM (in response to W_J_T)you're welcome


