There are two types of model elements, tools and variables, shown here in an organizational chart:
Tool elements are represented with rectangles and are created when you add a tool from ArcToolbox. The color of the tool has meaning, as described in the table below.
| Color |
Meaning |
|
Not all parameters have been supplied for the tool to run. Tool parameters will be supplied by the user of the model when the model is executed. |
|
All parameters have been supplied. The user does not have to supply parameters when the model is executed. |
Variables are represented with ovals.
You can think of variables as containers that hold values that can be changed. In the context of a model, a variable can be created and its value used in place of a tool's parameter value.
There are two types of variables: data and values. Data variables reference data on disk or in an in-memory layer (such as a layer the ArcMap table of contents). Values are everything else, such as numbers, strings, spatial references, and geographic extents.
Data Variables
There are two types of data variables, project data and derived data.
| Color |
Meaning |
|
Project data is data that you add to the model. Typically, it is the result of specifying a dataset to a tool's input parameter. |
|
Derived data is new data created by a tool in the model. |
|
An empty variable has no value. |
There are actually two kinds of derived data that you should be aware of.
New derived data is the SimpleTable.dbf you see in the above model. The Create Table tool creates new data that will be written to disk when you execute the model.
In/Out derived data is the result of a tool that alters the input data rather than creates a new dataset, such as the Add Field tool, shown below.
In models, you'll recognize derived data because the variable name, by default, will have the same name as the input data but with a unique number appended, as in SimpleTable.dbf (2) above. Different colors or symbols are not used. A tool dialog that does not have an output data parameter should create an in/out derived data element when used in a model.
In ModelBuilder, you cannot designate In/Out derived data as intermediate data.
Learn more about intermediate data
Value variables
There are two types of value variables, input and derived.
| Color |
Meaning |
|
Values that are input to a tool. For example, the buffer distance input to the Buffer tool. |
|
Values that are the result of a tool. Derived values can be inputs to other tools. The Calculate Value tool, for example, outputs the result of a logical or mathematical calculation. |
|
An empty variable has no value. |
Tool parameters and variables
For each tool you add to a model, you can create a model variable for each of its parameters.
When you first add a tool to a model, an output variable is automatically created from the tool's output parameter. In the following illustration, the Buffer tool was added to a model, and a new, empty variable was created for the output feature class.
If you double-click the tool to open its dialog, then fill out the three required inputs (Input Features, Output Feature Class, and Distance) and click OK, ModelBuilder will do the following:
- Automatically create a variable for your project data and connect it to the tool.
- Automatically rename the output variable.
- It will not create variables for values. The reason is that if ModelBuilder created a variable for every value in the tool, the model diagram would quickly become cluttered and unreadable.
You can create a variable from any parameter in the tool at any time. Right-click the tool, point to Make Variable > From Parameter, then click the parameter for which you want to make a variable. In the following illustration, the Distance parameter was made a variable.
Here is the result of making the Distance parameter a variable.
You can create variables in this manner at any time, even if you haven't opened the tool dialog.
To change the value of a variable, double-click the variable to open it and change the value. Once you've created a variable for a tool parameter, entering a new value using the tool dialog will do one of two things:
- If the variable is a data variable, a new variable will be created and connected to the tool. The old variable will remain, but it will be disconnected from the tool.
- If the variable is a value variable, a new variable will not be created. The existing variable will be disconnected from the tool.
The default names of tool and variable elements are automatically generated by ModelBuilder when you add the element. You can change these names to make your model easier to read and understand.
Learn more about element names