I'm writing an ArcPy script and iterating through a line feature class and I want to use each line as an input into the GeneratePointsAlongLine tool. How do I pull the line geometry from the SearchCursor?
I have tried 'SHAPE' and 'SHAPE@':
SHAPE gave me runtimeError: Object: Error in executing tool
SHAPE@ gave me ERROR 000530: Value is required Failed to execute (GeneratePointsAlongLines).
code:
with arcpy.da.SearchCursor(split_line, ['ORIG_SEQ','PointDist', 'SHAPE@']) as split:
for segment in split:
pointDistance = str(segment[1]) + " Miles"
arcpy.management.GeneratePointsAlongLines(segment[2], pointsAdded, "DISTANCE", pointDistance, None, "END_POINTS")
arcpy.management.Append(pointsAdded, allPoints)