Specifying model environment settings

There are two ways to set environments for models. The first method is to set the environment in the Environment Settings dialog box. The second method is to specify the environment using a model variable. Using a model variable is advantageous because you can expose the variable as a model parameter, which means that a user of the model's tool dialog can set the environment with the dialog at run time.

Learn more about model parameters

In either method, you must first open the model's properties. You can do this in one of three ways: from the Model menu of ModelBuilder, by right-clicking the diagram in ModelBuilder, or by right-clicking and clicking Properties the model tool in ArcToolbox. These three methods are illustrated below.

Accessing model level environment settings

Once the properties dialog box is open, click the Environments tab. Environments are presented in an expandable tree view with the six environment categories as the top-level entries, as shown below.

Environments tab on the model's properties

Method 1: Providing a specific value

To set a particular environment

  1. Expand the category in which the environment is located.
  2. Check the box next to the environments you want to set. You can check multiple boxes in multiple categories.
  3. Click Values.
  4. The Environment Settings dialog box opens, showing the categories of the settings. Open each category by clicking the Down arrows.
  5. Provide a value for each environment. The values supplied will be used by all processes in the model.

These steps are illustrated below.

Setting model environment values

The following illustration shows an example of checking multiple environments.

Setting multiple environments at once

An unchecked environment setting means that the value of the setting will be the same as the passed-down environment.

Method 2: Using a model variable

With this method, you create a stand-alone variable, or use an existing variable, and designate that the contents of the variable will be used for the environment setting. Since a model variable can be exposed as a model parameter, the user of the model can set the variable's value at run time using the model's tool dialog. The steps and example below show this technique by setting the Output Coordinate System environment found under General settings. The same technique applies to all environments.

Learn more about model variables

Learn more about model parameters

  1. In ModelBuilder, right-click the model diagram and click Create Variable.
  2. From the list of data types, click Coordinate System, then click OK.
  3. A new variable is added to the model.

  4. Right-click the variable and click Rename. Rename the variable Result coordinate system.
  5. Open the Model Properties and click the Environments tab.
  6. Expand the General settings tree and check the Output Coordinate System environment.
  7. Click Values. The Environment settings dialog opens. Expand the General Settings. The Environment settings dialog should appear as follows:
  8. Output coordinate system control

  9. In the Output Coordinate System drop-down list, click As Specified Below.
  10. In the unlabeled drop-down list, choose Result coordinate system (the model variable), as shown below. Click OK.
  11. The value of the Result coordinate system variable will now be used by all processes in the model.

    Specifying the model variable as the Output Coordinate System

  12. To expose the Result coordinate system model variable as a model parameter, right-click the variable and click Model Parameter.

The model below shows this technique using the Clip tool, along with the model's tool dialog opened from ArcToolbox.

Environment variable exposed as tool parameter

See Also