Contents
- 1 How does inline variable substitution work in ArcGIS Pro?
- 2 When to use inline variable substitution in model?
- 3 How to substitute workspace variable in ModelBuilder?
- 4 How do you substitute a variable in ModelBuilder?
- 5 How to substitute the name of a feature in ArcGIS?
- 6 How is an inline variable used in ModelBuilder?
- 7 When to use name variable in ArcGIS help?
- 8 Which is an example of 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.
When to use inline variable substitution in model?
When the tool is run, %Miles to Meter% is replaced with 1609.344. The example below shows the incorrect way to use inline variable substitution in a model and how the problem can be corrected.
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.
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.
What is the problem with% name% in ArcGIS?
Having a problem with the inline variable structure of %Name%. Attached is my model builder program. I want to be able to take the Name of the file (which is produced as a variable in the iterate raster loop) and use it to name the final output of the model.
How to substitute the name of a feature in ArcGIS?
When the tool executes, %Name% is replaced with the name of the feature class. Parcel ID is a model parameter that is specified when the model tool is run. This variable is used in the Expression parameter of the Select Layer By Attribute tool as “Parcel” = ‘%Parcel ID%’.
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.
How to create a system variable in ArcGIS?
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. Enclose the variable name in percent signs ( % ). Spaces within the variable name are allowed.
When to use name variable in ArcGIS help?
When the iterator Iterate Feature Classes runs, it creates an output variable for both the path and name of the feature class. The value in the Name variable can be used to construct the path to the projected feature class. When the tool executes, %Name% is replaced with the name of the feature class.
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:
How are variable names used in ArcGIS Pro?
The output of the Buffer tool is used as feedback into the tool as input. The model iterates and creates an output at each iteration. %n% is used in the output name of Buffer to give the output of each iteration a new name. The variable %t% refers to the time when tool output is created.