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

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)

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 (e.g., A* or Ari* or Land*,and so on).

String
dataset_type
(Optional)

The dataset type to iterate over.

  • CAD —Only CAD dataset will be the output.
  • FEATURE —Only Feature dataset will be the output.
  • GEOMETRICNETWORK —Only Geometric Network dataset will be the output.
  • MOSAIC —Only Mosaic dataset will be the output.
  • NETWORK —Only Network dataset will be the output.
  • PARCELFABRIC —Only Parcel Fabric dataset will be the output.
  • RASTER —Only Raster dataset will be the output.
  • TERRAIN —Only Terrain dataset will be the output.
  • TIN —Only TIN dataset will be the output.
  • TOPOLOGY —Only 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