I have the following model:
How do I break up the feature set of points (Input Locations) into start/end pairs, and iterate through each pair
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
You would need to have a column in your input feature class which will represent the RouteName (i.e., feature1 and feature2 belong to routeA; feature3 and feature4 belong to routeB and so on).
After you've prepared the input feature class (or maybe you already have one), you would need to use the Add Locations GP tool to load the stops into an existing Route network analysis layer (RouteLayer in your model). The parameter you are interested in is
field_mappings. In the Field column, choose what field should Network Analyst look for.
You can do the same from Python, for instance:
arcpy.na.AddLocations(RouteLayer, "Stops", input_fc, "Name PointName #; RouteName MyRouteNameColumn #", exclude_restricted_elements="EXCLUDE")
So you need to load all your stops just once in a model (no need to iterate anything). Your stops will be loaded with assigned RouteName to them and solved pair wise.
And after solving: