Good morning,
I am attempting to script a series of closest-facility analyses but have been unable to deactivate the hierarchy setting in the script. I've turned to AI as many of us do these days, and two AI engines have advised to pull the analysis layer's properties using arcpy.na.GetSolverProperties, then set the useHierarchy setting to either True or False as needed. When I add this language to my script, it doesn't error out, so it appears to be valid code, but whichever way I set it in the script, the resulting route data is the same.
I should mention that I'm able to deactivate the hierarchy if I run the analysis manually in ArcGIS Desktop, and that it's successful there - my routes take about 13 minutes to run without hierarchy, as opposed to 2 minutes if I use the script which uses hierarchy. While they take longer to run, I've been asked for the non-hierarchy outputs as the resulting routes are more direct. Has anyone been able to run network analysis in a script with the hierarchy deactivated, and if so, how were you able to do so? Thanks in advance.