Creating stand-alone variables

Variables are elements in a model that hold a value or a reference to data stored on disk. A variable can be created and used as a tool parameter. There are two types of variables:

There are many reasons to create and use variables in a model:

Creating input data and value variables

There are four ways to create a variable:

Steps:
    To create a model variable using the Create Variable option
  1. Click Insert > Create Variable, or right-click anywhere in a model and choose Create Variable. This opens a Create Variable window with a list of all data types that can be used in a model. This window also provides the option to create either a single value or multivalue variable.
    • To create a single variable, scroll to and choose any variable and click OK. This creates an empty variable in the model. You can then add data to the empty variable by double-clicking and opening the variable to navigate to the data on disk.
      Creating stand alone variable
    • To create a multivalue variable, choose the variable data type, check the multivalue option, then click OK. On the model tool dialog box, this variable can accept multiple inputs.

      Creating multivalue variable

Creating output data and value variables

When a tool is added to a model, it automatically creates an output data variable, and the variable is connected to the tool. The output variable remains empty (no color) until all required tool parameters are specified. Once all required tool parameters are specified, the output variable changes color to a default green color.

Changing variable data type

Every variable has an associated data type. To view the current data type or change the data type, right-click a variable, click Properties, then switch to the Data Type tab. The list of data types in the drop-down list are those that are supported by the variable.

Steps:
    To change a variable's data type
  1. Choose the data variable.
  2. Right-click and click Properties.
  3. On the Data Type tab, scroll to and choose the new data type in the drop-down list.
  4. Click OK to make the change.
    Changing variable data type

    The data type of the existing variable is changed.

Related Topics


9/13/2011