I'm building a model to measure distances (miles) and drive time (minutes) accumulated between predetermined origin and destination points. I already have this workflow down manually, but want to turn it into a geoprocessing model since it's a routine task for work.

I'm using ArcGIS Pro 2.9 with the Network Analyst extension, and streetmap premium for the network dataset.

Here is my model so far:

enter image description here

The process starts with a csv I receive that has on each row the fields from_X, from_Y, from_ID, to_X, to_Y, to_ID, and combo_ID. I want to import this csv into a new geodatabase as a table, run XY Table to Points off of this table twice - once for the from data, once again for the to data, but both should have the same attribute table. I want this output to become the origin points (from data) and destination points (to data) as 2 point feature classes that will be added into the Route tool via Add Locations.

enter image description here

From here, I add Make Route network analysis layer, and specify my network dataset. I created parameters for the network dataset, layer name, accumulate attributes, line shape, and ignore invalid locations at Solve Time, since those are things I'd want to consider each time I execute this workflow. However, I'm not seeing an option to specify the impedance as distance in miles, I only see the accumulate options in miles, minutes, etc.

How do I set the impedance in ModelBuilder?

enter image description here

At this point, I want to Add Locations twice - once for origins and once again for destinations. So far, the model takes the Route layer just created and connects to Add Locations twice before it solves. However, with the way I've built the model (connecting the origin and destination points as input parameters for the 2 Add Locations tools), I'm unable to specify the needed field mappings for each Add Locations tool. For field mappings, I want the Origin Add Locations to use from_ID as the Name and combo_ID as the RouteName, and to sort by combo_ID. However, these options aren't available if I directly connect the recently created origin/destination points to Add Locations as inputs. I imagine it's because the point data doesn't exist yet.

Is there something I'm missing in order to get the needed points into the Add Locations tool with the field mappings and sorting options showing up as I need?

I've reviewed Esri’s tutorial on how to Create a model for route analysis and ArcGIS Network Analysis Find Shortest Route with Large Number of Data, but none quite get me where I want to go.

Here's the view from the geoprocessing window so far:

enter image description here

enter image description here

As you can see, field mappings and sorting is grayed out.

Do I need to group the first part of the model or something to get this working right?

1 Answer 1


I posted a similar question on Esri's community forum here: https://community.esri.com/t5/arcgis-network-analyst-questions/route-analysis-using-modelbuilder-field-mapping/m-p/1201431/thread-id/7980#M7981

I received a response pointing me to these tools:https://github.com/Esri/large-network-analysis-tools

The Solve Large Analysis With Known OD Pairs tool from the esri github worked. I used the first part of my model successfully to turn the original table into 2 point feature classes (the origin and destination points), then put their input into the esri tool, and got the needed output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.