How is IF THEN ELSE implemented in ModelBuilder?
In ModelBuilder, if-then-else logic can be implemented by writing a script tool that tests some condition, then outputs two Boolean variables that describe the true and false condition and incorporating this script tool in a model.
How to use IF THEN ELSE logic in ArcGIS?
As an alternative to writing a script tool, you can also use the Calculate Value tool to test the condition and output a Boolean. The model below incorporates a script tool called Check Coordinate System to use branching logic.
What do logical tools do in ArcGIS Pro?
Logical tools are a category of ModelBuilder utilities that help you control the flow of processes in a model and enable if-then-else branching logic. Evaluates if the specified data exists. Evaluates if the input data has the specified fields.
When to use Con or else in ArcGIS Pro?
The Test, Con, Greater Than, and Raster Calculator tools can be used to perform a Boolean evaluation of raster. In the following example, if a cell value is greater than 2000, then set to 1 (True), else set to 0 (False). The Con or Raster Calculator tool can be used to conditionally evaluate a raster.
How is the if value is tool used?
The If Value Is tool checks whether the extension matches the Values parameter. The model only copies raster data with a .tif extension. The Test, Con, Greater Than, and Raster Calculator tools can be used to perform a Boolean evaluation of raster.
What to do if the Boolean output is false?
If the Boolean output is True, use the Calculate Field tool to calculate values of the Description field. If the Boolean output is False, use the Select Layer By Attribute tool to make the selection and modify field values. The following example uses the Parse Path tool to get the file extension.
When to use branching logic in ModelBuilder?
However, if the input dataset is found to have an unknown coordinate system, the model defines a projection system and projects the input data. One of the key steps in using branching logic in ModelBuilder is setting one of the conditional outputs as a precondition to further processing.
How does ModelBuilder provide flexibility in iteration?
ModelBuilder also provides flexibility in iteration, as an entire model or simply a single tool or process can be executed repeatedly. You can use the output of a process as an input to a previous process. This is known as feedback, since you feed the output back to the input.
How is interactive data entry done in ArcGIS?
This interactive data entry is done through a process similar to editing features inside ArcMap. Similarly, record sets allow tabular or attribute information to be entered interactively and immediately used as input. ArcGIS provides an in-memory workspace where output feature classes and tables can be written.