I'm attempting to change the start point and last point of some lines (pipes). The code runs below without an error but when I check the lines in ArcMap I discover that the end points haven't moved at all. Shouldn't I be able to edit/update the geometry of these points this way?
desc = arcpy.Describe(pipes2) PipeCur = arcpy.UpdateCursor(pipes2) desc= arcpy.Describe(pipes2) shapefield = desc.ShapeFieldName cnt = 0 pipe = PipeCur.next() while pipe: lngIDSYS = pipe.IDSYS whereClause = "IDSYS = " + str(lngIDSYS) print whereClause pntCursor = arcpy.SearchCursor(EndPoints,whereClause) EndPnt = pntCursor.next()#return the only point PipeFeat = pipe.getValue(shapefield)# need the shape field name here Last = PipeFeat.lastPoint# returns the last point. print "Changing the x and y" print str(Last.X) + " is the x value before." print str(EndPnt.NEAR_X) + " is the x value of Near_X." Last.X = EndPnt.NEAR_X print str(Last.X) + " is the x value after." Last.Y = EndPnt.NEAR_Y PipeCur.updateRow(pipe) cnt = cnt + 1 pipe = PipeCur.next()