If you have a working model, no need to export to Python, just write a little driver script. This allows you to run any model builder model from a .bat file or from Task Scheduler (assuming it has no arguments).

Export ModelBuilder to Python is usually pretty rubbish in my experience... When the feature layer is made it is doing a whole lot of field mapping stuff which should be unnecessary - it is optional so I just deleted it (couldn't see anything wrong with it, but...), let me know if this works:

If you have a working model, no need to export to Python, just write a little driver script. This allows you to run any model builder model from a .bat file or from Task Scheduler (assuming it has no arguments).

Curt, I would like to do this. My understanding is I need to make a python script called runtool.py and then a batch file that will call runtool.py, path to my toolbox and then a space followed by the name of the tool in the toolbox. Is this correct? When I run the batch file nothing happens.

My understanding is I need to make a python script called runtool.py and then a batch file that will call runtool.py, path to my toolbox and then a space followed by the name of the tool in the toolbox. Is this correct? When I run the batch file nothing happens.

The python file itself is executable. You can test whether it is working first by running directly from a DOS prompt, no .bat file required. (Though you could use one if you wanted I suppose.)

Curt, I tried to copy your format, this is what I have so far. Something is not right. Should it be on the C drive?[code]C:\work>runtool.py "C:\Documents and Settings\tmagdaleno\Application Data\ESRI\Desktop10.1\ArcToolbox\zCamarilloCustom.tbx" Model1[code]I pasted this into dos and it says C:\work is not recognized as an internal or external command

I don't quite understand the syntax of E:\work>runtool.py and what it is doing

Attachments

If you have a working model, no need to export to Python, just write a little driver script. This allows you to run any model builder model from a .bat file or from Task Scheduler (assuming it has no arguments).