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:
أكثر...
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:
- "!Shape!.lastPoint.X"
- "!Shape!.lastPoint.Y"...

أكثر...