Hello,
I've had trouble finding how to access the PathPoint positions today.
Apparently, the correct way to do it is by writing something like this: app.activeDocument.pathItems[itemIndex].pathPoints[pointIndex]
Which makes sense (pathPoints is an array) and it works fine and everything. Great.
Now why in the Illustrator Scripting Reference - JavaScript (CC 2015) PDF, page 138, this method is suggested: index(itemKey), type:number, returns:PathPoint, "Gets an element from the collection."?
I've tried using it and the only thing I got is this error message "app.activeDocument.pathItems[0].pathPoints.index is not a function" (with pathPoints.index(0) for example) which leads me to believe that there is no index method in the API... Is this correct or am I simply being very dumb and not using the method properly?
The reason I'm taking the time to write about this is because it seems I'm not the only one having this issue:
https://forums.adobe.com/thread/440700
EDIT:
Also, it seems pathPoints[pointIndex] works, but PathPoints[pointIndex], as it is written in the guide, doesn't.