ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

A quick tour of using inline variable substitution

  • Inline variable classification
  • Rules for using inline variables
  • Search order for inline variables

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.

For examples of inline variable substitution, see the following:

  • Examples of inline model variable substitution
  • Examples of inline system variable substitution

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.

Rules for using inline variables

  • Enclose the variable name in percent signs (%).
  • Spaces within the variable name are allowed.
  • Substitution is not case sensitive. Initial Value and initial value are equivalent.

Search order for inline variables

When a model executes, the inline variables are identified and used in the following order:

  1. Model variables.
  2. Model environment settings.
  3. System variables (%i% and %n%).
  4. Variables in the parent model. If the currently running model is a submodel, the parent model's variables are searched.
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal