Hi,
I am trying to write a for loop that iterates line generation for 4 compass directions, using the "Bearing Distance to Line" tool on ArcGIS Notebooks.
Bascically, I want to input 4 fields into the line "Bearing field". I have stored the 4 fields in a list named "Dirfields". I'm trying to use this list as an input for "Bearing Field".
Any idea on how can I achieve this workflow? I have attached a photo of the Bearing Distance to line dialog box and an excerpt from my script below. Please let me know if there is anything else I can provide.
Thank you
# Creating four fields (one for each compass direction) and specifying their values in the feature class "SusBui_Point". Values are in decimal degrees.
arcpy.management.CalculateField("SusBui_Point", "DirNorth", "0", "PYTHON3", '', "DOUBLE", "NO_ENFORCE_DOMAINS")
arcpy.management.CalculateField("SusBui_Point", "DirEast", "90", "PYTHON3", '', "DOUBLE", "NO_ENFORCE_DOMAINS")
arcpy.management.CalculateField("SusBui_Point", "DirSouth", "180", "PYTHON3", '', "DOUBLE", "NO_ENFORCE_DOMAINS")
arcpy.management.CalculateField("SusBui_Point", "DirWest", "270", "PYTHON3", '', "DOUBLE", "NO_ENFORCE_DOMAINS")
#Creating a list of the four fields
Dirfields = arcpy.ListFields ("SusBui_Point", "Dir*", "Double")
# Now I want to use a for loop to iterate line creation in each of the four compass direction using the "Bearing Distance to Line" tool and the list created in the previous step.
# Not sure how to get started.