AnsweredAssumed Answered

Find shortest route and export links that make up the route

Question asked by fzc0023_AuburnUniversity on Apr 28, 2020
Latest reply on Apr 29, 2020 by jsandhu-esristaff

Hello. I am new at AcrPy and coding in general. I am working on the following task using ArcMap 10.7 Python Toolbox.

We are able to use the ArcPy code to generate a Network Dataset in ArcMap using Network Analyst functions. We want to find the shortest route between location A and location B listed in a feature class. 

What we'd like is: 

1- the shortest route (distance) from A to B, and

2 - the list of links that make up this route. Is this a property we can extract from the route?

In our code, we will be doing this thousand times, so we would like to avoid exporting thousands of routes if possible. Instead, we'd like to store the links in a large array.

We would greatly appreciate any suggestions or/and advice.

Outcomes