-
How to find the selected vertices point?
Hi, I’m Rahadyan
I’m making code to display the vertices coordinates of each path point.
var selectedShape = app.project.activeItem.selectedProperties[0].path.value.vertices; var alertMessage = ""; for (var i = 0; i < selectedShape.length; i++) { var vertex = selectedShape[i]; alertMessage += "Vertex " + (i + 1) + " = X: " + vertex[0] + ", Y: " + vertex[1] + "\n"; } alert(alertMessage);
Well, I want to modify my code to know which pathpoint I’m currently selecting with the mouse and displaying in an alert. How’s the script?
Thank you for your help