ActivePortalChangedEvent is not fired after change teh active portal

94
1
Jump to solution
12-11-2017 04:13 AM
Highlighted
New Contributor III

Hello

ArcGIS Pro SDK question: an addin needs to know if the user change the portal which is active. for this purpose it looks that there is an event:
ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent. But it is not fired.

I used the Snippet from https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Sharing

ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent.Subscribe((args) => {    var active_uri = args.ActivePortal?.PortalUri.ToString();   //etc});

And subscribed the event after Event "ArcGIS.Desktop.Framework.Events.ApplicationStartupEvent" in the initialize-function like it is described in the chapter "Subscribing to Application Events": ProConcepts Configurations · Esri/arcgis-pro-sdk Wiki · GitHub 

other events like ProjectClosedEvent, ProjectOpenedEvent, ProjectSavedEvent, ProjectItemsChangedEvent works fine.

But the events ActivePortalChangedEvent, ArcGISPortalAddedEvent, ArcGISPortalRemovedEvent do not work as i expect. Do I understand something wrong?

Thanks in advance

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

Hi

Your code looks correct. I was able to reproduce the problem.  This has been fixed in 2.1.

Thank you!

Uma

View solution in original post

Reply
0 Kudos
1 Reply
Highlighted
Esri Regular Contributor

Hi

Your code looks correct. I was able to reproduce the problem.  This has been fixed in 2.1.

Thank you!

Uma

View solution in original post

Reply
0 Kudos