Is it possible to use a built-in condition like esri_map_pane combined with a custom condition? It would be natural to add the id of the esri_map_pane condition as a state within my condition.
<insertCondition id="workflow_pane_created" caption="has the workflow pane model been initialized yet?">
<state id="workflow_pane_enabled" />
<state id="esri_map_pane"/>
</insertCondition>
You could supply an attribute on the condition itself whether to evaluate them with a boolean and or or logic.
I have a situation where I do not want buttons to be active unless the map is active and initialized. Then I have subsequent buttons I do not want active building on the prior buttons state. Trying to do this without being able to build off of the esri provided states is a bit difficult.
Solved! Go to Solution.
Steve,
It is possible to build complex conditions based off of a number of states. For example
<insertCondition id="myCondition" caption="My Condition">
<or>
<state id="state1"/>
<state id="state2"/>
</or>
</insertCondition><insertCondition id="myCondition2" caption="My Condition 2">
<and>
<not>
<state id="state1"/>
</not>
<not>
<state id="state3"/>
</not>
</and>
</insertCondition>
You can use your own states or any of the Esri defined states in your conditions.
To use Esri defined conditions, you need to determine their state definition. You can accomplish this by searching for the condition in the appropriate module daml file. For example esri_mapping_xxx condition can be found in the (install_folder)\bin\Extensions\Mapping\ADMapping.daml file.
There are some special Esri conditions - such as esri_mapping_mapPane and esri_mapping_layoutPane that are actually states. So yes you are able to use esri_mapping_mapPane within your own condition definitions.
Narelle
Steve,
It is possible to build complex conditions based off of a number of states. For example
<insertCondition id="myCondition" caption="My Condition">
<or>
<state id="state1"/>
<state id="state2"/>
</or>
</insertCondition><insertCondition id="myCondition2" caption="My Condition 2">
<and>
<not>
<state id="state1"/>
</not>
<not>
<state id="state3"/>
</not>
</and>
</insertCondition>
You can use your own states or any of the Esri defined states in your conditions.
To use Esri defined conditions, you need to determine their state definition. You can accomplish this by searching for the condition in the appropriate module daml file. For example esri_mapping_xxx condition can be found in the (install_folder)\bin\Extensions\Mapping\ADMapping.daml file.
There are some special Esri conditions - such as esri_mapping_mapPane and esri_mapping_layoutPane that are actually states. So yes you are able to use esri_mapping_mapPane within your own condition definitions.
Narelle
This information needs to go in the documentation. Thank you for describing it.
There is a community sample that delves into states and conditions that might be of help here:
It should be described in the proguide. ProGuide Code Your Own States and Conditions · Esri/arcgis-pro-sdk Wiki · GitHub
Thanks Steve. I've already made an issue to update the states and condition documentation.