Summary
Evaluates an input value compared to a single value, a list of values, or a range of values using a defined comparison operator.
Usage
This tool is intended for use in ModelBuilder, not in Python scripting.
The tool has two Boolean outputs, True and False. Based on the condition being evaluated, one of the two Boolean outputs is true and the other is false after the tool runs. These Boolean outputs must be set as a precondition to the downstream tools for those to execute if either of the preconditions is true.
Note:
Most tools in ArcGIS are empty (without color) when added to a model; however, the If Value Is, If Data Exists, Collect Values, and Merge Branch tools are not. The If Value Is tool is always in a ready-to-run state (with color). This is because the input to the tool can be empty, which is considered a valid input for the comparison.
Syntax
arcpy.mb.ValueIsIfThenElse({input_value}, {value_test}, {comparison_type}, {values}, {range_values}, {comparison_value})
Parameter | Explanation | Data Type |
input_value (Optional) | The input value to evaluate. | Any Value |
value_test (Optional) | Specifies the type of comparison operator to use.
| String |
comparison_type (Optional) | Specifies the type of data comparison to use.
| String |
values [values,...] (Optional) | The list of values to compare to the input value. | Any Value |
range_values [[Any Value, Any Value],...] (Optional) | Specifies the range values to compare to the input value.
| Value Table |
comparison_value (Optional) | The single value to compare to the input value. | Any Value |
Derived Output
Name | Explanation | Data Type |
true | If the specified criteria evaluates to True, this parameter will be set to True. | Boolean |
false | If the specified criteria evaluates to False, this parameter will be set to True. | Boolean |
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes