User input while running model builder

3703
3
09-24-2014 12:26 PM
JamesMitchell1
New Contributor

I have created three modelbuilder tools that must be run in sequence.  After running each tool, the user must examine several shapefiles and potentially change the input parameters of the next tool.

Each tool works fine, but I am unsure what the best method is to pass variables between tools.

I tried combining the tools as nested models, but could not figure out how to get user input and change model parameters after each submodel runs.

I also tried combining the tools into one python script.  The input window popped up for the first tool, I set the parameters, and it ran, but the second tool did not run. No error code was returned so I do not know why the script did not finish running.

I am considering creating an intermediate table in the scratch workspace and using it as an array.  Is this the only way to pass variables between tools in modelbuilder if I need user input after running each tool?

0 Kudos
3 Replies
FreddieGibson
Occasional Contributor III

I would think that if you need user input after each tool and cannot programmatically determine the inputs for the following tools that you'd want to run the tools as three separate tools. The process of stopping the model at the completion of each task would somewhat violate the rules of the gp framework (i.e. user inputs are specified prior to running the tool)

When your users are specifying the inputs for the next tools, do they need access to the data in ArcMap to evaluate their decisions? If not, have you ever considered running your tool standalone in a dos prompt?

MelissaNorthey
Occasional Contributor

I recently watched an ESRI video on ArcGIS Pro & how tasks (or workflows) are used.  They mentioned workflow vs. modelbuilder & that the workflow or tasks involved the user in between steps.  I've not tried it yet but it might be worth looking into for what you are trying to do.  It seems workflow is an extension for ArcGIS Desktop (but you could get a 60 day trial to test it out) or you could look into using tasks in ArcGIS Pro.

0 Kudos
WesMiller
Regular Contributor III

What is your workflow?

What variables are the user examining?

Like Freddie Gibson​ if you could programmatically test these variables it wouldn't be necessary for the user to interact with the program. You may have to switch to python, but anything you can automate, helps.

0 Kudos