I have a problem using the "For" iterator in Model Builder (v 10.2.2, 64 bit, Windows 7). I wanted 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 did the first two iterations, then overwrote the first one for the remaining iterators.
So, with the increment set to 5, the starting timestep as 5 and the final as 20 I would expect to get 3 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).
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.
This is the model builder screen:
I realise this is similar to Does ModelBuilder have Iterate Field Values bug when model run without being in Edit mode? but am not sure if it's due to the specific iterators or a more general problem? Has anyone else had these issues?