Select to view content in your preferred language

Model builder iterators and sub-models

3375
2
12-14-2015 04:35 PM
KristineKosnik
Deactivated User

Does anyone have examples of using iterate workspace and iterate rasters in model builder where one of the iterators is in a sub- model?

Thanks.

-Kristine

0 Kudos
2 Replies
FreddieGibson
Honored Contributor

Nope, but I quickly put one together. Are you having a problem building the model?

model.png

KristineKosnik
Deactivated User

I got it to work now, but I'm not sure why. My iterate workspace model looks just like yours.  My iterate rasters sub model is set up like yours, but instead of Building Pyramids and Collect Values I am projecting rasters to a different folder and setting a null value. I had set some parameters using in-line variables (in addition to the initial Workspace or Raster Catalog) and it seems that is where the trouble was.    The model would run, but it kept over-writing the first raster.  When I unchecked all the parameters it ran correctly.  Several questions come to mind:  Why was the submodel with parameters checked over-writing the first raster on every iteration?  Why did Model Builder change the Parameter names when I connected the Workspace? Why did unchecking the parameters work?  SubModelsNotWorking.jpgSubmodel Working.jpg