Select to view content in your preferred language

Model Builder Order of Operation

24328
7
02-26-2011 01:24 PM
JoelShegrud
Deactivated User
Is there a way to set which tools run in which order in model builder?

I am attaching a picture of what my model looks like. What I need is for the "Air2Rod" custom tool (built around the feature to shapefile tool) to run before the "deleteAppend" tool.

When the deleteAppend tool runs first it clears the results layer so that there is nothing for Air2Rod to process.

If you need any more information I would be happy to offer it.

Thank you
0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus
see this page, particularly step 6 if you wish to change the order of things
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000001v000000.htm
0 Kudos
NiklasNorrthon
Frequent Contributor
Look up precondition in the model builder help. Preconditions will force a specific task to wait for some other task to complete sucessfully before it runs.
JoelShegrud
Deactivated User
Thanks for the responses.

I tried changing the order of parameters and in this case it didn't have any affect on the order of operation (it may well in other applications).

I had a hard time setting preconditions because Air2Rod didn't have any parameters. What I ended up doing was adding a stop function to the end of the Air2Rod tool, setting "continue" as a parameter. I then used the "continue" as a precondition for running the deleteAppend tool.

I am attaching the two models so that anyone else who encounters this thread will be able to see the solution.

Thank you again for your help.
JoshWhite
Honored Contributor

My issue is similar but different.  I have a number of processes that are related but independent of each other, I would like to force them to go in a particular order as its easier to diagnose issues when looking at logs after the model fails.  For instance, I have found that my services tend to lock my SDE after a short period and I would like to run the longest process first in order to make sure it gets done and doesn't have to be rerun if locks develop during the model run.  

The one at the bottom should run first since it is so long.  I know rearranging the graphic wont help a bit.  The top four processes are much quicker and should be run after the long one.  

Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
curtvprice
MVP Esteemed Contributor

Make the element Parcels_1 with URL Populated a precondition to all four "fast" tools. (Use the magic wand tool to connect the output to each tool and select "Precondition."

0 Kudos
JoshWhite
Honored Contributor

I had it all set up the way I wanted and it would run without errors. Trouble was, the feature classes were never created at the end.  I've basically abandoned my efforts to make this easier because the work to get it that way is harder than just continuing to do things the same way.

Josh White, AICP
Principal Planner

City of Arkansas City
0 Kudos
PaulDodd
Emerging Contributor

Hey Joel,

You can use 'Preconditions' to control Order of Operation: A quick tour of using preconditions—Help | ArcGIS for Desktop 

In the above example, process 2 cannot start until the Feature Dataset has been created by process 1.

I've used this to control dependant field calculations, where the value of one calculated field is used to calc another field.

This is very simple to setup and does not require you to alter the workflow or logic of your existing process.