Iterate Datasets (ModelBuilder)

Summary

Iterates over datasets in a workspace or feature dataset.

Learn how Iterate Datasets works in ModelBuilder

Usage

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

  • The tool has two outputs: Dataset and Name which could be used as inline variable (e.g. %Name%) in other tools.

Syntax

arcpy.mb.IterateDatasets(in_workspace, {wildcard}, {dataset_type}, {recursive})
ParameterExplanationData Type
in_workspace

Workspace or a feature dataset which stores the dataset to iterate.

Workspace; Feature Dataset
wildcard
(Optional)

A combination of * and characters that help to limit the results. The asterisk is the same as saying ALL. If no wildcard is specified, all inputs will be returned. For example, it can be used to restrict Iteration over input names starting with a certain character or word (for example, A* or Ari* or Land* and so on).

String
dataset_type
(Optional)

The dataset type to iterate over.

  • CADOnly CAD dataset will be the output.
  • FEATUREOnly Feature dataset will be the output.
  • GEOMETRICNETWORKOnly Geometric Network dataset will be the output.
  • MOSAICOnly Mosaic dataset will be the output.
  • NETWORKOnly Network dataset will be the output.
  • PARCELFABRICOnly Parcel Fabric dataset will be the output.
  • RASTEROnly Raster dataset will be the output.
  • TERRAINOnly Terrain dataset will be the output.
  • TINOnly TIN dataset will be the output.
  • TOPOLOGYOnly Topology dataset will be the output.
String
recursive
(Optional)

Determines if subfolders in the input workspace will be iterated through recursively.

  • Checked—Will iterate through all subfolders.
  • Unchecked—Will not iterate through all subfolders.
Boolean

Derived Output

NameExplanationData Type
dataset

The full path to the dataset.

Dataset
name

The name of the dataset.

String

Environments

This tool does not use any geoprocessing environments.

Licensing information

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