I'm trying to get the First Point coordinates (x,y) and Final Point coordinates (x2,y2) from a polyline in ArcGIS 10 with the Field calculator.
I've added 4 (double) fields like StartX,StartY,EndX and EndY,I tried with:
"!Shape!.positionAlongLine(0.0,True).firstPoint.X" "!Shape!.positionAlongLine(0.0,True).firstPoint.Y" "!Shape!.positionAlongLine(1.0,True).firstPoint.X" "!Shape!.positionAlongLine(1.0,True).firstPoint.Y"
But no luck. The error: "The row contains a bad value".
What am I doing wrong?
Thanks to @radouxju for your answer because it was what I was looking for!!, but NOW I don't know What's happening with my ArcGIS10. Let's see:
I could compute all these statements (4), to every field:
But, after that I checked for errors and I found this! That there are times that the ArcGIS field calculator doesn't compute well. In the example, the yellow one, it's 16 meter long, but its coordinates are the same, but the the next polyline is well computed... What's happening?