Validating a model

Model validation means verifying that all data elements and parameter values are valid. Validating will return has-been-run processes to their ready-to-run state. If, by validating the model, processes that were in the ready-to-run or has-been-run state change to not-ready-to-run (elements are white), it means that one or more input variables are invalid.

Validating data variables

Data variables reference data on disk and only contain descriptive information about the data on disk, not the actual data.

Data description

For example, a feature class data variable contains the path to the data on disk, a list of information about all the fields in the feature class (its schema), and other pertinent information used by tools.

When you create a data variable in your model, ArcGIS opens the dataset, fetches all the descriptive information about the data, and stores this information in the data variable. It does this only when you first create the data variable, because fetching the descriptive data can be time consuming. Other alternatives, such as fetching when the model is opened for editing or when accessing the variable in any way, would make model building much slower. Over time, the description of data may not match the actual contents of the data. For example, you may have deleted fields from the dataset, or renamed the dataset. When you validate a model, the following occurs:

  • All datasets are opened and the description of the dataset is refreshed.
  • All has-been-run processes are returned to the ready-to-run state unless:
    • The dataset no longer exists or some property of the dataset has changed in such a way that the tool can no longer execute. Typically, this is due to a deleted field. In this case, either the variable or the tool will become invalid—not-ready-to-run—and you must open the variable or tool and supply a new value.

To refresh the contents of data variables in the ModelBuilder window, click Model > Validate Entire Model. You can also validate from the validate icon on the toolbar.

Validate Entire Model

Validation posts messages for each tool. To see the messages, right-click an element and click View Messages, or create a model report and view the messages there.

Validating a value variable

In contrast to data variables, value variables (which don't reference data on disk) contain the actual data, as shown below. When you validate a model, the content of each value variable is checked to see if it is valid for the tools in which it is used.

Validating value variable
10/29/2012