[GIS] Using Feature Dataset Iterator in ModelBuilder

arcgis-desktopiteratormodelbuilder

I had posted this on the ArcGIS forums, but thought I may get some further input here.

Having issues acquiring the appropriate input and erase features during the iteration process.

Please see below linked ModelBuilder image. The model is currently not functional as the inner nested model does not currently send each erase feature class to the Erase function. It merely iterates all of them and then sends the last feature iteration class to the outer model. Hence if I run the model on the three files with the wildcard 040112 and three dates with wildcard 100111 (both recursively through folders), I get one correct erased output, but two incorrect ones.

I can't figure out how to send the feature class along for each iteration of the inner nested model. Clearly I am missing something, but I am unsure what at the moment.

I could be barking up the wrong tree as I am relatively new at advanced modelbuilder stuff. For all I know maybe this is more of a python thing, but I am just starting to get into that and it is over my head at the moment.

Screenshot

Best Answer

In the sub model, insert "Collect Values" after the iterator. You find it in the model builder menu "Insert" -> "Model Only Tools"