Select to view content in your preferred language

Dockpane - How to keep remote, configuration data between ArcGIS Pro sessions

456
2
03-17-2024 02:13 PM
nita14
by
Frequent Contributor

Dear Community, 

I am working on a DockPane add-in which at the very first step should grab and populate the combobox values from a remote http address. I have implemented it in the OnActivate function (if _isInitialized == false) within ViewModel class. It works pretty well during a single ArcGIS Pro sesssion. However, when I leave the dockpane opened, save and close the aprx and then reopen the same aprx, the combobox does not contain any values, even though, the remote endpoint is called  by the code. As dockpane is a singleton, I guess I need to somohow force it to refresh the view with the latest dictionary data.

Do you know how to persist the values for comboxes between different ArcGIS Pro sessions? Where to put the logic to grab remote configuration values? Any hints?

===========Edit

Here is a link to my repo with the code. Thanks!

==========

Thank you!

Bests,

Adam

0 Kudos
2 Replies
nita14
by
Frequent Contributor

@CharlesMacleod - thank you refactoring my code and spotting the error with the collection syncing. Solved.

0 Kudos
MK13
by
Frequent Contributor

@nita14 @CharlesMacleod I have the same question. Do you mind sharing how you resolved this? Specifically, when user set backstage options change in the same pro session, I would like the dockpane to listen for those changes and update its input values.

0 Kudos