The travel modes of my network dataset work correctly in ArcGIS Pro, but do not work using python arcpy.nax. Is there something wron in how I call them up in my script or are there some informations from the properties that are not used by arcpy and have to be manually recreated?
nd_travel_modes = arcpy.nax.GetTravelModes(network_layer)
for mode in nd_travel_modes:
# Set properties.
service_area.timeUnits = arcpy.nax.TimeUnits.Minutes
service_area.defaultImpedanceCutoffs = [10, 20, 30]
service_area.travelMode = mode
service_area.outputType = arcpy.nax.ServiceAreaOutputType.Polygons
service_area.geometryAtOverlap = arcpy.nax.ServiceAreaOverlapGeometry.Overlap
##### Load the inputs. #####
input_facilities = r"C:\Users\callt\Desktop\oS\psX\projects\1238 Warendorf\data\analysis\p30\1238_data.gdb\koordinaten_betriebe"
service_area.load(arcpy.nax.ServiceAreaInputDataType.Facilities, input_facilities)
##### Solve the analysis. #####
result = service_area.solve()
It looks to me like this code should work. However, I can't see where you created the Service Area object (that's probably not the issue). What results are you seeing that tell you the travel mode isn't working correctly? Can you give some more details or post some screenshots?
Green is not a line but the correct service area polygon.
Pink is the result when I use arcpy.nax for the same analysis. It seems to ignore my prohibitions (bus is only supposed to use bus line)
A couple of other questions: