Solved! Go to Solution.
Sorry for not being clear. The routes B102, B104 etc. are polylines and the stops S102, S104 etc. are points. The reason they have to be snapped to a vertex is that they are going to be used in a network dataset where the stops need to be at a vertex for the purpose of transfers. I tried using a model builder but only being able to use one iterator meant I couldn't do it. I tried putting one iterator in a sub-model and running it but I was not able to do it correctly. The submodel would iterate through all of the feature classes and then output the last feature class in the dataset, this would then be used in the main model. This repeated itself for each iteration of the main model.
Main Model
[ATTACH=CONFIG]26583[/ATTACH]
Sub Model
[ATTACH=CONFIG]26584[/ATTACH]
I have 2 Feature Datasets in a geodatabase. One dataset contains bus routes and the other contains bus stops for each route. I want to create a script that will snap the bus stops to the vertex of the relevant bus route. There are over 100 routes and stops. They are stored in each dataset in order. They are named like this S102, S104 etc. for stops and B102, B104 for routes. I'm unsure about how to do a for loop that will get a stop and then get the right bus route
Sorry for not being clear. The routes B102, B104 etc. are polylines and the stops S102, S104 etc. are points. The reason they have to be snapped to a vertex is that they are going to be used in a network dataset where the stops need to be at a vertex for the purpose of transfers. I tried using a model builder but only being able to use one iterator meant I couldn't do it. I tried putting one iterator in a sub-model and running it but I was not able to do it correctly. The submodel would iterate through all of the feature classes and then output the last feature class in the dataset, this would then be used in the main model. This repeated itself for each iteration of the main model.
Main Model
[ATTACH=CONFIG]26583[/ATTACH]
Sub Model
[ATTACH=CONFIG]26584[/ATTACH]