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...

Iterate Feature Selection

  • Summary
  • Usage
  • Syntax
  • Environments
  • Licensing Information

Summary

Iterates over features in a feature class.

Learn how Iterate Feature Selection works in ModelBuilder

Usage

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

  • Iterate Feature Selection calls Make Feature Layer to make a new selection and creates two outputs: Selected Features and Value. The output Selected Features is a feature layer and can be used in other geoprocessing tools that accept a feature layer in ModelBuilder.

  • Complex feature classes, such as annotation and dimensions, are not supported by this tool.

  • More than one group by field can be used for the selection. If one or more group by fields are selected, the number of iterations is determined by the number of unique combinations of the group by fields. For each iteration, the selection of the output feature layer is determined by the number of records that match the given combination of the group by fields. If more than one group by field are chosen, then the values are concatenated <field value1>_<field value2> in the output inline variable name. See an example below where two group fields: Name of the hurricane and the Category of the hurricane are used. The output Value is 'Katrina_H5' and so on for the other values.

    Using two group by fields

  • If no group by field is chosen, the output value is the group by ObjectID field, and the selection is one record per selection. If the table does not have an ObjectID (OID) field, such as an Excel table, then the value is blank.

  • The tool has two outputs: Output Selected Features and Group Value of the field for selected features, which could be used as in-line variable %Value% in other tools.

  • The temporary feature layer can be saved as a layer file using the Save To Layer File tool or saved as a new feature class using the Copy Features tool.

  • 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.

Syntax

IterateFeatureSelection_mb (in_features, {fields}, {skip_nulls})
ParameterExplanationData Type
in_features

Input feature class or layer containing features to iterate.

Feature Layer
fields
[[Field, Null Value],...]
(Optional)

Input field or fields used to group the features for selection. Any number of input fields can be defined, resulting in a selection based on a unique combination of the fields. If no field is specified, the OID is used to iterate over features.

Define the null value for the field. By default, null values are included in the selection unless specified or the option to skip all null values is checked. The default values are "" for strings and "0" for numbers.

Value Table
skip_nulls
(Optional)

Determines if null values in the grouping field or fields are skipped during selection.

  • Checked—Skip through all the null values in the grouping fields during selection.
  • Unchecked—Set as default. Include all the null values in the grouping fields during selection.
Boolean

Environments

This tool does not use any geoprocessing environments

Licensing Information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • An overview of the Iterator toolset
  • A quick tour of using iterators
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