ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

For

  • Summary
  • Usage
  • Syntax
  • Environments
  • Licensing information

Summary

Iterates over a starting and ending value by a given value. It works exactly like For in any scripting/programming language, executing through a set number of items.

Learn how For works in ModelBuilder

Usage

  • This tool is intended for use in ModelBuilder and not in Python scripting.

  • The tool increments the starting value until the maximum specified limit is reached. For example, If the From Value is 0 and To Value is 10 to be incremented By Value 3, the iteration will increment until value 9.

  • If an Iterator is added to a model, all tools in the model iterate for each value in the iterator. If you do not want to run each tool in the model for each iterated value, create a sub-model/model within a model/nested model that contains only the iterator and add it as a model tool into the main model.

  • Legacy:

    The For tool replaces Iterate By Count or Iterate By Variable that previously existed in the Iteration Options of Model Properties.

Syntax

arcpy.mb.For(from, to, increment)
ParameterExplanationData Type
from

Value to start the iteration from.

Long
to

Value to run the iteration to.

Long
increment

Value to increment by.

Long

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Iterator toolset
  • A quick tour of using iterators

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal