ModelBuilder in Batch

3181
6
05-24-2011 07:53 AM
LukeWebb
Occasional Contributor III
Hi, I have misunderstood something here!

I have a model that accepts some input parameter datasets....

Unions them to say C:\tool\InputsUnioned.shp

Then say it does another process, before a final process whose output path is a parameter.


The model works perfectly/


Now I try to batch run it for my hundreds of required runs. But it always does the union hundreds of times first overwriting the previous C:\tool\InputsUnioned.shp output each time.

Can I batch it so it runs the entire model at a time rather than how its setup by default?

Thanks,
Tags (2)
6 Replies
LukeWebb
Occasional Contributor III
Please can anyone help? I need to run a model a lot next week, and need the batch function!
0 Kudos
BruceHarold
Esri Regular Contributor
Hi All

In this case the recommended approach is to use an iterator instead of a batch input. Iterators run the entire mode for each iteration vs. batch which runs the model once and runs each tool n times for each execution. In this case use the feature class iterator if all the feature classes are in one workspace or use iterate multi-value to select the set of feature classes.

http://help.arcgis.com/en/arcgisdesk...000001w000000/

Regards
0 Kudos
LukeWebb
Occasional Contributor III
hanks Bruce,

My problem with multivalue iterators is, unless I am mistaken, they only let you modify one model parameter per model iteration. The batch dialog lets you specify a different value for every model parameter for each iteration. What I need is the ability to specify each model parameter differently per iteration like with the batch dialog, but force the processes within the model to run sequentially like with an iterator.

Is there a way to get the best of both worlds (other than the aforementioned elsewhere -- write a Python script to call the model)?
0 Kudos
GraemeBrowning
Occasional Contributor III
Having encountered the same issue over at Stack Exchange GIS, I agree with Luke.

Iterators will provide a workaround sometimes but not always, and there is a large class of users who are comfortable with tools based on models and batch mode but will not become Python programmers to address the remaining cases.

A bug number and fix would be my preference rather than a workaround.

- Graeme
0 Kudos
MichaelStead
Occasional Contributor III
Although I would agree this is a seemingly needless limitation, I haven't had that much difficulty in the past just exporting to python and modifying the script. Doesn't sound like your model is very complicated. This Python wrapper probably does more to make something usable than just right clicking in the toolbox and exporting to a script. Try running it through this:
http://www.arcgis.com/home/item.html?id=83585412edd04ae48bdffea3e1f7b2e7
0 Kudos
LukeWebb
Occasional Contributor III
Agreed - BUT

ESRI software is famous for its usability. I am a GIS professional and don't struggle to write a python script to call my model in batch...

but I have to support other users...and specifically insist they do not use the 'Batch' function they use for other tools as it will fail.

And then I have to write a custom python script for them depending on their input data to call my model.

And then explain to them how to run the script...

And spend lots of time offering support....



I want to be able to tell them right click..batch ... and enter the parameters!!!!!!!