Model Builder with Iterator, runs the whole model many times

830
1
08-05-2022 11:30 AM
JoseSanchez
Frequent Contributor

Good afternoon everyone,

We want to select all the points and lines inside a polygon. For example selecting all pump stations inside a Municipality.

 

When running an Iterator in ModelBulder, does it run all  the model for each iteration?

 

We built a model and add a iterator, and it runs the whole model, not the portion that we want to iterate.

The process:

 - Create FGDB

- Enter a parameter to Query Polygon Municipality layer to query a specific polygon (Municipality) 

- Iterator. Loop all FC in a FGDB to clip the Municipality area.

 

When running the model when it iterates, it runs the whole model for each iteration.

 

  

0 Kudos
1 Reply
KimGarbade
Frequent Contributor

Yes.  If you include an iterator in any part of your model it will run all of the tools/processes in the model every time through the iterator.  The solution to this is breaking the one model into multiple submodels and calling the submodels that contains the iterator from the "Main" model.

Look for "Advanced use of model iterators" here: Add a submodel to a model—ArcGIS Pro | Documentation

0 Kudos