Nesting Iterators

616
2
11-23-2010 06:09 AM
HeatherCarlos
New Contributor III
I'm having trouble nesting 2 iterators.

I have tax parcels that are categorized by the type of destination (grocery store, bank etc....). My study subjects are in a point file and in another file, I have polygons that are buffers (sometimes network buffers, sometimes simple circles) around each study subject.

For each individual study subject, I want to select all the parcels that are in that study subject's buffer, then I'll use NEAR to calculate the distance from the study subject to each of the selected parcels.

So, I have two iterators.

1) Iterate feature selection - this iterates through the buffer file and selects each buffer (I can also use the value from this process to select the related study subject)

2) Iterate field values - this iterates through the types of destinations (grocery, bank etc)

I would like to loop as follows:

Select one buffer/subject pair
Select one destination group
--calculate NEAR (which also means adding fields,calculating values, converting to layers and whatnot)
Repeat for all of the destinations (for the first buffer subject pair)

Repeat for the next buffer/subject pair  

and so on


Since I can only use one iterator for each model, I've tried lots of combinations of submodels, but I still end up with the first iterator running completely through ALL of the iterators before it starts doing the second iterator.  So, in essence, they aren't nested, one does all of its business before the next one starts.

I've included jpg's of the current incarnation of my model.

Thanks for any thoughts.

Heather Carlos
0 Kudos
2 Replies
ChrisSnyder
Regular Contributor III
I don't have any recent experience w/ looping in model builder, but my feeling is you might be hitting up against ModelBuilder's limitations here.

This sounds like a job for Python...
0 Kudos
by Anonymous User
Not applicable
Original User: csny490

I don't have any recent experience w/ looping in model builder, but my feeling is you might be hitting up against ModelBuilder's limitations here.

This sounds like a job for Python...
0 Kudos