Sunday 18 November 2018

ArcGIS ModelBuilder looping wrong tools?



I've created a toolchain in ArcGIS ModelBuilder (see in the picture)


Arc Model Builder


But after Creating the "Flow Direction" and the "Iterate field Values" it starts again with the "DEM reconditioning", it's an endless loop. But why it is doing so and how can I stop that.


My target after creating the flow direction is to project the resulting layer to all UTM stripes like described in another question: Looping Projection in ArcGIS ModelBuilder?



Answer



When you put an iterator in Model Builder, it is supposed to execute the entire model with every iteration. What I think you are looking for instead is to either write this as a python script, so you can better control the looping, or your other option would be to use a sub-model. What I mean is, set up just the part that needs to iterate as a model all by itself. When you do this, make sure to set input and output parameters for that model (http://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/creating-model-parameter.htm). Then, add the model you just created to this model shown in your question as a tool that replaces the relevant portion of the existing model. You may find some useful information about this process at the following help article http://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/integrating-model-within-a-model.htm


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...