How is an inline variable used in ModelBuilder?

How is an inline variable used in ModelBuilder?

In ModelBuilder, contents of a variable can be used as a substitute for another variable by enclosing the substituting variable in percent signs ( % ). Substituting variables in this manner is called inline variable substitution. A simple case of inline variable substitution is replacing some text or a value in a model with user input.

What are the different types of inline variables?

Inline variable classification. Inline variables are classified into two types: Model variables —Any variable in a model: %variable name%. System variable —There are two system variables in ModelBuilder: %i% for a list number of a variable and %n% as the iteration number in the model.

How do you substitute a variable in ModelBuilder?

In ModelBuilder, the value or dataset path of a variable can be substituted for another variable by enclosing the substituting variable name in percent signs ( %VariableName% ). Substituting variables in this manner is called inline variable substitution.

How does inline variable substitution work in ArcGIS Pro?

ModelBuilder supports inline variable substitution in the following formats: Model variables—Any variable in a model. System variables—Variable %n% can be used in an iteration workflow as an iteration counter in the model. The variable %t% refers to the time when the output is generated in the format of YYYYMMDDHHMMSS.

How to use inline model variable substitution in ArcGIS?

To correctly handle this situation, use the Parse Path tool to separate the full path into its components and then use the dataset name (contained in the Name variable) for inline substitution. Feedback on this topic?

How to substitute a variable in a model?

Any variable in a model can be used as a variable substitute by enclosing the variable name in percent symbols ( %variable name% ). This topic has examples of using in-line model variable substitution in ModelBuilder.

How to substitute workspace variable in ModelBuilder?

This topic has examples of using in-line model variable substitution in ModelBuilder. In the model below, a workspace variable, Data Workspace, has a value of C:\\Data.gdb. This workspace location is substituted as an inline variable in the Project tool parameters by enclosing the variable name in percent symbols.

Which is an example of inline variable substitution?

Substituting variables in this manner is called inline variable substitution. A simple case of inline variable substitution is replacing some text or a value in a model with user input. For examples of inline variable substitution, see the following: Inline variables are classified into two types: