I'm trying to snap a line's vertices to several points in height. The XY have already been snaped, but the snap tool doesn't seem to get the Z value. There is one vertex for each point. Is there a way to update the vertices of the line with the Z value of the points?
I've had a similar problem before, but that time it was between points which shared the same ID. I'm not sure the vertices are able to store an ID the same way. I have acces to Arcgis Pro 2.2 and ArcMap 10.6.
Update: I tried to edit BERAs code to edit an existing fc instead of creating a new one.
with arcpy.da.UpdateCursor(existingFC, ['SHAPE@']) as cursor: for row in cursor: linelist =  for part in row: partlist =  for pnt in part: if (pnt.X, pnt.Y) in pointzdict: print("in list") row = arcpy.Point(pnt.X,pnt.Y,pointzdict[(pnt.X,pnt.Y)]) else: row = pnt #row = arcpy.Polyline(arcpy.Array(linelist), arcpy.Describe(polylinefc2).spatialReference, True) cursor.updateRow(row)
It gives me this error:
Traceback (most recent call last): File "<string>", line 13, in <module> SystemError: <built-in method updateRow of da.UpdateCursor object at 0x00000195B48ECDF0> returned NULL without setting an error