Uh oh. Now what?
Have you ever opened a model tool and seen the statement, "This tool has no parameters"? Maybe you closed the dialog box thinking the model had a fatal error.
Time to clear up the confusion. That statement is information, not an error message.
The model will run fine as-is, meaning it will run using the inputs and criteria specified by the model creator. You can't change anything. Go ahead and click OK to run the model.
Model parameters are things that can be changed. If they exist, you will see them when you open a model tool.
So what can be changed using a parameter? Just about anything—inputs, outputs, and tool-specific parameters. A good way to learn how to work with model parameters is to create a model, add its tools, and set the tool parameters as usual.
After the model is built (and saved), think about what criteria you would want to change when running it in the future. Running a model using different input data is a common need. Adding a parameter can meet that need.
The input to the Create Folder tool is a model parameter.
Allow for ChangeTo make a tool's input a parameter, in the ModelBuilder window right-click the input element and choose Model Parameter. It's that easy. The letter "P" above an element indicates it's a model parameter.- Tip: When you make an element a model parameter, the element name will display in the model tool. Element names can be cryptic, so a good practice when adding a parameter is to rename its element so that model users will understand what is expected. To rename an element, right-click it and choose Rename.
Here, the Create Folder tool input was renamed to "Set your workspace folder" (the original name was a folder path). With the new name, it will be clear that you can browse to a different
workspace if you don't want to use the default location.
To make a tool parameter into a model parameter, first make the tool parameter a variable, then set the variable to be a model parameter. The Create File GDB tool has three parameters: Location, File GDB Name, and Version.
Suppose you want the ability to assign a different geodatabase name each time the model is run (perhaps you'll be creating multiple geodatabases as part of your project).
File GDB Name is now a model parameter.
In the model window, right-click Create File GDB, click Make Variable > From Parameter > File GDB Name.
The variable is added to the diagram with an arrow connecting it to the Create File GDB tool. To make the variable a model parameter, right-click it and choose Model Parameter. Now it too has a "P" above it.
In this case, "File GDB Name" is self-explanatory, so there's no need to rename the element.
Descriptive parameter names help model users know what to do.
To support testing multiple scenarios, now suppose you want to be able select subsets of features for processing. In the example model, the Feature Class to Feature Class tool is used to convert a shapefile of
ASAM incidents to a geodatabase feature class.
The tool has two parameters that make sense to designate as model parameters: Input Features (required) and an optional Expression parameter used to define a subset of features. Input Features is the location of the shapefile on disk, which could vary.
Right-click the Feature Class to Feature Class tool and click Make Variable > From Parameter > Input Features. Right-click the Input Features variable element and choose Model Parameter.
Repeat this process for the Expression parameter. Both of these model parameters will benefit from being renamed.
Model parameters exposed in the model tool.
After saving the model, close ModelBuilder and open the model as a tool to see the parameters.
- Tip: If you don't like the display order of the parameters in the model tool, you can reorder them in ModelBuilder (Model menu > Model Properties > Parameters tab).
Notice the help text on the right side of the model tool. This is the Description text from the Model Properties dialog box.
Less Is More