To explain the use of an iterator, the model example below uses the Iterate Feature Classes iterator to project every feature class in a workspace, name each Project tool output dynamically based on the input name using inline variable substitution, and add a new field to each feature class.
- An input workspace is specified for Iterate Feature Classes to iterate through every feature class in that workspace.
- Feature classes to iterate through are restricted by specifying a wildcard and feature type (only polygon feature classes with a name starting with I will be iterated through).
- Iterate Feature Classes produces two outputs: the feature class iterated through and the name of the feature class. The feature class variable is connected as the input to the Project tool, and the feature class name variable is used for inline variable substitution to dynamically name each output from the Project tool with the same name of the input feature class.
- A new field is added to every feature class by connecting the Add Field tool.