<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ActivePortalChangedEvent is not fired after change teh active portal in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activeportalchangedevent-is-not-fired-after-change/m-p/814065#M2466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;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:&lt;BR /&gt;ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent. But it is not fired.&lt;/P&gt;&lt;P&gt;I used the Snippet from &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Sharing"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Sharing&lt;/A&gt;&lt;/P&gt;&lt;PRE style="color: #24292e; background-color: #f6f8fa; padding: 16px;"&gt;&lt;SPAN class="" style="color: #6f42c1;"&gt;ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent.Subscribe&lt;/SPAN&gt;((args) =&amp;gt; {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #6f42c1;"&gt;active_uri &lt;/SPAN&gt;= args.ActivePortal?.PortalUri.ToString();&amp;nbsp;&amp;nbsp; &lt;SPAN class="" style="color: #6a737d;"&gt;//etc&lt;/SPAN&gt;});&lt;/PRE&gt;&lt;P&gt;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":&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations" title="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations"&gt;ProConcepts Configurations · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;other events like ProjectClosedEvent, ProjectOpenedEvent, ProjectSavedEvent, ProjectItemsChangedEvent works fine.&lt;/P&gt;&lt;P&gt;But the events&amp;nbsp;ActivePortalChangedEvent, ArcGISPortalAddedEvent, ArcGISPortalRemovedEvent do not work as i expect. Do I understand something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Dec 2017 12:13:17 GMT</pubDate>
    <dc:creator>GISMountains</dc:creator>
    <dc:date>2017-12-11T12:13:17Z</dc:date>
    <item>
      <title>ActivePortalChangedEvent is not fired after change teh active portal</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activeportalchangedevent-is-not-fired-after-change/m-p/814065#M2466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;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:&lt;BR /&gt;ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent. But it is not fired.&lt;/P&gt;&lt;P&gt;I used the Snippet from &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Sharing"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Sharing&lt;/A&gt;&lt;/P&gt;&lt;PRE style="color: #24292e; background-color: #f6f8fa; padding: 16px;"&gt;&lt;SPAN class="" style="color: #6f42c1;"&gt;ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent.Subscribe&lt;/SPAN&gt;((args) =&amp;gt; {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #6f42c1;"&gt;active_uri &lt;/SPAN&gt;= args.ActivePortal?.PortalUri.ToString();&amp;nbsp;&amp;nbsp; &lt;SPAN class="" style="color: #6a737d;"&gt;//etc&lt;/SPAN&gt;});&lt;/PRE&gt;&lt;P&gt;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":&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations" title="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations"&gt;ProConcepts Configurations · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;other events like ProjectClosedEvent, ProjectOpenedEvent, ProjectSavedEvent, ProjectItemsChangedEvent works fine.&lt;/P&gt;&lt;P&gt;But the events&amp;nbsp;ActivePortalChangedEvent, ArcGISPortalAddedEvent, ArcGISPortalRemovedEvent do not work as i expect. Do I understand something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 12:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activeportalchangedevent-is-not-fired-after-change/m-p/814065#M2466</guid>
      <dc:creator>GISMountains</dc:creator>
      <dc:date>2017-12-11T12:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: ActivePortalChangedEvent is not fired after change teh active portal</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activeportalchangedevent-is-not-fired-after-change/m-p/814066#M2467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Your code looks correct. I was able to reproduce the problem.&amp;nbsp; This has been fixed in 2.1.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 02:45:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activeportalchangedevent-is-not-fired-after-change/m-p/814066#M2467</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2017-12-12T02:45:52Z</dc:date>
    </item>
  </channel>
</rss>

