Iterator logic bug

Discussion created by ryanschuermann on Feb 10, 2014
Latest reply on Feb 12, 2014 by ryanschuermann
ArcGIS 10.1

Problem: iterators force the execution of functions upstream of the iterator.

Excuse my ignorance if this is a known bug, or there is a workaround, but after conducting multiple searches I couldn't find an answer to this 'issue' with iterators.

Normally, and with all the examples given by ESRI, you simply slap in an iterator to your model and feed it a static source of data. Works great.

But, when I try to implement this logic:

do a bunch of stuff before the iterator, then do a bunch of stuff after the iterator... the entire model is iterated!


Buffer a polygon, creates a new shapefile of one polygon,
Create n random points, using the buffer shapefile as a constraint, creates a shapefile of n random points
Iterate Features, using the n random point shapefile as input features
and then perform a bunch of operations and analysis on (each of) the point(s).

now, the problem is, Model Builder iterates the ENTIRE MODEL, not just the functions downstream of the iterator. WHY is the model executing functions upstream? I absolutely do not want it to buffer and generate n random points every time, I need it to do that once, and then process the n points!

Now, I know, most of you will say, just do those 2 functions beforehand and feed the points directly into the model...but that is not acceptable, because I want to run the model X times, so it processes a unique set of random n points for X times.

Do I need to implement some sort of sub-model? I shouldn't have to, the iterator logically, should have no affect on functions that are performed before the iterator is encountered...logically. It's very frustrating. I plan to just do it in python, but would like to know how to get this to work logically and properly in model builder.