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:
If Data Exists is always in a ready-to-run state (colored in) when added to a model. This is because the input is an optional Any Value data type, and an empty value is considered as valid input and evaluated as false. If the data type does not match the real data type of the input data, the False output variable will be set to true.
Syntax
arcpy.mb.DataExistsIfThenElse({in_data}, {data_type})
Parameter | Explanation | Data Type |
in_data (Optional) | Input data element to be evaluated. | Any Value |
data_type (Optional) | The data type of the data element being evaluated. The only time you need to provide a value is when a geodatabase contains a feature dataset and a feature class or table with the same name. In this case, you need to select the data type (feature dataset, feature class or table) of the item you want to evaluate.
| String |
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