While (ModelBuilder)

Summary

Iterates until a condition becomes true or until a condition comes false.

Learn how While works in ModelBuilder

Usage

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

  • 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

IterateCondition(in_values, {condition})
ParameterExplanationData Type
in_values
[in_values,...]

The input values to evaluate to determine whether to continue to iterate.

Any Value
condition
(Optional)

Specifies whether to iterate until the input values are all true or are all false.

  • TRUEThe tool will iterate until all the input values are true. This is the default.
  • FALSE The tool will iterate until all the input values are false.
String

Derived Output

NameExplanationData Type
continue

A Boolean indicating whether or not to continue.

Boolean

Environments

This tool does not use any geoprocessing environments.

Licensing information

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