Model builder iterator bug?

4088
3
Jump to solution
12-12-2014 04:03 AM
KateParks1
New Contributor II

I have come across an issue when using the "For" iterator. I want to create a series of rasters using the "Constant Raster" tool. The model works as expected when run from within model builder, but when run as a model tool (both with and without parameters for the For variables) it runs the first two iterations, then overwrote the first one for the remaining iterations.

So, with the increment set to 5, the starting timestep as 5 and the final as 20 I would expect to get 4 output layers "Const_5yr", "Const_10yr", "Const_15yr", "Const_20yr". When run from within the model builder, I get what is expected. When run as a stand alone tool, I get "Const_5yr" and "Const_10yr", but "Const_5yr" has the value expected for "Const_20yr" (and from the dialogue in the results window I can see that "Const_5yr" is being overwritten each time).

To add even more confusion, when I add the iterator model to another model, it works as expected when run as a tool, as well as within model builder.

Can anyone shed any light on this?  It is similar to an issue highlighted here: arcgis desktop - Does ModelBuilder have Iterate Field Values bug when model run without being in Edi...  

This is the model builder screen:

SE1-min.jpg

0 Kudos
1 Solution

Accepted Solutions
KateParks1
New Contributor II

Seems to relate to these bugs:

  • NIM-103740 - When a model with an iterator is run from within ModelBuilder, it completes correctly, but overwrites the outputs when run as a tool;
  • NIM-098729 - In ArcGIS for Desktop 10.2.1, when running a model with the Iterate Feature tool, an incorrect number of outputs are generated only when running the model as a tool.

Thanks to GISGe at StackExchange for the answer!

arcgis desktop - Is there a bug with the "For" iterator in model builder? - Geographic Information S...

View solution in original post

0 Kudos
3 Replies
KateParks1
New Contributor II

Seems to relate to these bugs:

  • NIM-103740 - When a model with an iterator is run from within ModelBuilder, it completes correctly, but overwrites the outputs when run as a tool;
  • NIM-098729 - In ArcGIS for Desktop 10.2.1, when running a model with the Iterate Feature tool, an incorrect number of outputs are generated only when running the model as a tool.

Thanks to GISGe at StackExchange for the answer!

arcgis desktop - Is there a bug with the "For" iterator in model builder? - Geographic Information S...

0 Kudos
DavidRonneberg
New Contributor

Hi Kate,

Did this ever resolve with a software update to 10.3?

0 Kudos
curtvprice
MVP Esteemed Contributor

NIM103740: When a model with an iterator is run from within Mod..   

says it was fixed "in the next release" which would be 10.3