I use arcpy.na.MakeRouteLayer build a layer, and use arcpy.na.AddLocations add two stop points, and use arcpy.na.Solve get the shortest route. But how can I get the length of the shortest route.
Solved! Go to Solution.
the polylineM field represents the geometry, use the standard methods for reading geometries
in here, they use the getoutput object and savetolayer to produce the layer, so from there you should be able to get the geometry and calculate its length
Hi, Dan Patterson, Thanks for your answer.But I don't know how to get the geometry of the na result layer, how to do that?
I get the Route_Layer1 after solve , the Routes has a attribute table .
the polylineM field represents the geometry, use the standard methods for reading geometries
With your help, I sovle the problem, thany you very much.
Good!! Now, perhaps you could close the thread with the answer that solved it or mark it as assumed answer, so that there is some closure for other people looking for similar responses
OK, I will do it.