Select to view content in your preferred language

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

353
1
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
1 Reply
nita14
by
Frequent Contributor

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

0 Kudos