I have a feature class with polylines that represent pipes. Each polyline feature is single-part and generally only has small number of vertices (generally 2 - 5). In some cases I need to update the starting and/or ending node/vertex to a new location, without moving the other vertices.
I want to do this in Python either through field calculator or a separate script/tool. I was planning on getting the geometry of the feature, creating an array with vertex points, updating first and/or last point, in the array, and then updating the feature geometry. However, I am having a difficult time figuring out the syntax. If I use a arcpy.da cursor, I can get the feature geometry (I think), but cant seem to pull the geometry properties. Below is quick syntax I used in Python window in ArcMap. Once I get to the row (feature), I thought I would be able to access polyline geometry properties to get the verticies, but keep getting message that data is tuple and is not callable.
Any advise would be greatly appreciated!
>>> with arcpy.da.SearchCursor(fc,'SHAPE@') as cursor:
... for row in cursor:
(<Polyline object at 0x45afe4b0[0x276eb760]>,)