Solved! Go to Solution.
import arcpy fc = r'c:\yourFGDB.gdb\yourLines' # update cursor (be careful with this and try it on a copy of your data) fields = ["SHAPE@","XCentroid","YCentroid"] with arcpy.da.UpdateCursor(fc,fields) as curs: for row in curs: geom = row[0] x_new = row[1] y_new = row[2] array = arcpy.Array() for part in geom: firstpnt = part[0] firstpnt.X = x_new firstpnt.Y = y_new part[0] = firstpnt array.add(part) curs.updateRow([arcpy.Polyline(array), x_new, y_new])