Select to view content in your preferred language

ArcPro Add-In enabled state

924
3
07-21-2021 11:31 AM
JeffBoyton
Emerging Contributor

Does ArcPro save the state of enabled/disabled External Extensions on exit?  I have an Add-In set up with the IExtensionConfig interface and the appropriate DAML settings, but I cannot seem to tell if the module should come up enabled because it was previously enabled or come up disabled because it was previously disabled.  Is there some way to find out from ArcPro what the initial state is?

0 Kudos
3 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

You need to save project. Without saving project external extension state will not be saved. If extension is yours then you need to manage reading from and writing to project.

How to save your extension state you can find in BackStage_PropertyPage sample:

arcgis-pro-sdk-community-samples/Framework/BackStage_PropertyPage at master · Esri/arcgis-pro-sdk-co...

0 Kudos
JeffBoyton
Emerging Contributor

Are you saying that each Add-In has to keep track of its own extension state and needs to save this state in the project or application settings?

0 Kudos
GKmieliauskas
Esri Regular Contributor

It depends on your situation.

Our application for ArcGIS Pro consist of more than 10 add-ins (more than 50 buttons and tools) but we use one extension for all of them. One add-in (module) is responsible for extension state managing. Other add-ins (modules) reacts to extension state changes via condition which changes depend on extension state.

To put extension in each add-in makes reason if each add-in is different application.

0 Kudos