Geoprocessing environment settings are additional parameters that affect a tool's results. They differ from normal tool parameters in that they don't appear on a tool's dialog box (with certain exceptions). Rather, they are values you set once using a separate dialog box and are interrogated and used by tools when they are run.
There are four levels of environment settings: application, tool, model, and model process. All levels contain the same environment variables and have the same effect on output results. They differ only in how you access and set them.
The four environment levels form a hierarchy where the application level is highest. In this hierarchy, environment settings are passed down to the next level, as illustrated below. At each level, you can override the passed-down environment settings with another setting.
- Application-level settings are the default and will be applied to any tool when it is executed.
- Tool-level settings are applied to a single run of a tool and override the application-level settings.
- Model-level settings are specified and saved with a model and override tool- and application-level settings.
- Model process-level settings are specified at the model process level, are saved with the model, and override model-level settings.
Model level environmental settings
Model environments can be set for the entire model, but these settings affect a model differently depending on whether you are running a model in ModelBuilder or from its tool dialog box.
If you execute a model using its tool dialog box, the tool environment settings are passed down to the model. If you execute the model using ModelBuilder, the application environment settings are passed down.
Model environment settings are saved with the model, and because of this, the dialog box for setting model environments is different than the dialog box for setting the application or tool environments. On the model environment dialog box, you check which environment settings you will permanently override in the model. Conversely, unchecked settings will use the value of the passed-down application or tool environment.
There are two ways to set environments for an entire model:
- Set the environment in the Environment Settings dialog box.
- Set the model environment using a model variable.
Model process environmental settings
Model environment settings are passed down to model processes (a model process is a tool plus its data). The dialog box for setting a model process environment is the same as that for setting a model's environments. When the model process executes, the model's environments are passed down to the process and any checked environment in the model process overrides the environment settings passed down from the model environment.
There are three ways to set the environment for a model process:
- From the process properties
- Exposing the environments parameter of a process as a model variables
- Connecting a stand-alone environmental setting variable to a process