Hello,
I am using the basic XY to line (data management) tool's syntax and am attempting to retain the input attribute fields, which is listed as a parameter of the tool, but I receive the following type error when trying to do so:
"XYToLine() takes from 0 to 9 positional arguments but 10 were given"
In the xy to line tool documentation (https://pro.arcgis.com/en/pro-app/tool-reference/data-management/xy-to-line.htm) the attribute parameter is the 10th argument (optional). Please see my syntax below for reference, w/ the attribute syntax underlined for emphasis.
arcpy.management.XYToLine("Join4_SortiesOutput", r"C:\Users\bisho\Box Sync\ALOFT\LegacyALOFT\Symbology_Layers\ALOFT_MCWL1_Data_Results.gdb\ALOFT_MCWL1_Data_Results.gdb\Results\GPD_SortieLnPro1", "FROM_X", "FROM_Y", "TO_X", "To_Y", "GEODESIC", None, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision","True")
The tool works w/o the attribute parameter included. The built in xy to line tool does not have the option to keep attributes. Any suggestions of how to get the tool working w/ this functionality?
Thanks in advance!
Penelope