Iterator only does one iteration

413
5
06-21-2011 08:31 AM
StuGreene
New Contributor
I have a layer of polylines representing routes, with a field "routeid" for each.  I have 23 routeids in the source layer.  Suppose I want to use an iterator to create a new layer for each routeid.  I set up a model as in the attachment, specified the iterator to group by route id, and put the %value% in the output of the Make Feature Layer tool.

When I run the model, the iterator runs first and assigns Value=1, then I get my feature layer RouteView_rt1 and it looks right.  But that's it - everything stops after that.  If I run it again, I get the same RouteView_rt1 layer created over again. 

What am I doing wrong that keeps the iterator from actually iterating?
0 Kudos
5 Replies
MelitaKennedy
Esri Notable Contributor
Hopefully, this isn't the problem but you've set the model to not run the iteration only once? See

Model menu item, Model properties, integration tab

I think it's designed that way for testing purposes.

Melita
0 Kudos
StuGreene
New Contributor
Entire contents of the Iteration tab is grayed out.
0 Kudos
StuGreene
New Contributor
I modified the input of the iterator to explicitly point to the source geodatabase file, and now it is working.
0 Kudos
MelitaKennedy
Esri Notable Contributor
I modified the input of the iterator to explicitly point to the source geodatabase file, and now it is working.


Excellent! Thanks for letting me know.
0 Kudos
JennWalter
New Contributor
Hi Stu

I have a quick question for you on the model iternation. Are your routes single lines or do you have multiple segments that make a entire route? 

Currently I use segments to make a route. It is highly possible that several of the same segments may be located in many routes.  For example all my bus routes go down main street but from there the buses could drive down any road.  Each street is seperate due to all the unique characteristics assigned that road. We have a master table that is constantly updated from the client that lists all the routes.

Just wondered what your experience was with route being a total path or many parts making up the whole path. 

thank you
0 Kudos