<?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 Re: Missing/Empty MapURI in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765087#M390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for following up Uma!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My workflow goal is to react to an event when the active map changes to a different map (as opposed to changes to another pane that represents the same map -- e.g. clicking on an Attribute Table). This roughly corresponds to knowing when the values in the Contents pane change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some examples of when I'd like to react:&lt;/P&gt;&lt;P&gt;On Map A, Click Map B -- raises event&lt;/P&gt;&lt;P&gt;On Map A, Click an Attribute Table from A -- no event&lt;/P&gt;&lt;P&gt;On Map A, Click an Attribute Table from B -- raises event&lt;/P&gt;&lt;P&gt;On Attribute Table from A, Click Map A -- no event&lt;/P&gt;&lt;P&gt;On Attribute Table from A, Click Attribute Table from B -- raises event&lt;/P&gt;&lt;P&gt;On Map A, Click Catalog pane -- no event (because no active map)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would ideally apply to all panes that have an active map, including Layouts, Fields, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Originally I was using&amp;nbsp;ActiveMapViewChangedEvent, but (similar to the &lt;A _jive_internal="true" href="https://community.esri.com/thread/248953-activemapviewchanged-event-fires-twice" target="_blank"&gt;issue linked&lt;/A&gt; above), I was getting too many events,&amp;nbsp;when switching to attribute tables (first to null, then to the new map).&amp;nbsp; For a while I was handling&amp;nbsp;ActivePaneChangedEvent, and extracting the Map URI separately depending on what type of pane it was.&amp;nbsp; Unfortunately the Map doesn't always exist at the time of Pane changed.&amp;nbsp; As a result, I switched back to&amp;nbsp;&lt;SPAN&gt;ActiveMapViewChanged, but added a class-level variable to track to last non-empty URI.&amp;nbsp; Now, I'm able to raise the different-map event when the incoming&amp;nbsp;IncomingView's Map's URI is different than the last non-empty URI.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnActiveMapViewChanged&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ActiveMapViewChangedEventArgs args&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; inURI &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; args&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IncomingView&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;URI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrWhiteSpace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inURI&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Compare&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;_lastUri&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inURI&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// Raise my different-map event&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrWhiteSpace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inURI&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; _lastUri &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; inURI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which is working somewhat better, but still seems to have a few inconsistencies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this a good approach? Do you have any other recommendations?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:29:32 GMT</pubDate>
    <dc:creator>Justin_ODell</dc:creator>
    <dc:date>2021-12-12T08:29:32Z</dc:date>
    <item>
      <title>Missing/Empty MapURI</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765085#M388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed some quirky behavior with getting the MapURI out of certain panes.&amp;nbsp; I'm using ArcGIS Pro 2.2.4.&lt;BR /&gt;Based on&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/911800-activemapviewchanged-event-fires-twice#comment-914434" title="https://community.esri.com/message/911800-activemapviewchanged-event-fires-twice#comment-914434" target="_blank"&gt;https://community.esri.com/message/911800-activemapviewchanged-event-fires-twice#comment-914434&lt;/A&gt;,&amp;nbsp;I was getting the related Map's URI from an attribute table pane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
ActivePaneChangedEvent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Subscribe&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OnActivePaneChanged&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnActivePaneChanged&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PaneEventArgs args&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; inPane &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; args&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IncomingPane &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; TOCActiveMapViewProviderPane&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; inURI &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; inPane&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapURI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When initially loaded, sometimes inPane?.MapURI is empty ("") even when inPane is not null. Later in the same program, it may return the correct value.&amp;nbsp; The little experimentation I've done so far, shows having a "(" in the FeatureLayer's alias seemed to lead to the empty initial MapURI value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Has anyone else seen this?&lt;/P&gt;&lt;P&gt;2) Are there any more details on when this should and shouldn't work? or how to work around it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;possibly related to this note from:&amp;nbsp;&lt;BR /&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/875696-re-drag-drop-into-a-dockpane?commentID=875696#comment-875696" title="https://community.esri.com/message/875696-re-drag-drop-into-a-dockpane?commentID=875696#comment-875696" target="_blank"&gt;https://community.esri.com/message/875696-re-drag-drop-into-a-dockpane?commentID=875696#comment-875696&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: slategray; border: 0px; font-weight: inherit;"&gt;//last, get the source map to which the map members belong&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;var&lt;/SPAN&gt; mapuri &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; dropInfo&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444; border: 0px; font-weight: inherit;"&gt;GetMapUri&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="" style="color: slategray; border: 0px; font-weight: inherit;"&gt;//99 times out of a 100 this will be the active view map....&lt;/SPAN&gt;
&lt;SPAN class="" style="color: slategray; border: 0px; font-weight: inherit;"&gt;//but, if not, get the actual map (or scene) this way&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;var&lt;/SPAN&gt; map &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; FrameworkApplication&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Panes&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;OfType&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;&amp;lt;&lt;/SPAN&gt;IMapPane&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;?&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444; border: 0px; font-weight: inherit;"&gt;Select&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;mp &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;&amp;gt;&lt;/SPAN&gt; mp&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;MapView&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444; border: 0px; font-weight: inherit;"&gt;Where&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;m &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;&amp;gt;&lt;/SPAN&gt; m&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;URI &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;==&lt;/SPAN&gt; mapuri&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444; border: 0px; font-weight: inherit;"&gt;First&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;;&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765085#M388</guid>
      <dc:creator>Justin_ODell</dc:creator>
      <dc:date>2021-12-12T08:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Missing/Empty MapURI</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765086#M389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;Are you specifically trying to find the Map URI when you open an Attribute table of a feature layer in the active map?&lt;/P&gt;&lt;P&gt;Just trying to understand your exact workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 01:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765086#M389</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-08-13T01:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Missing/Empty MapURI</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765087#M390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for following up Uma!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My workflow goal is to react to an event when the active map changes to a different map (as opposed to changes to another pane that represents the same map -- e.g. clicking on an Attribute Table). This roughly corresponds to knowing when the values in the Contents pane change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some examples of when I'd like to react:&lt;/P&gt;&lt;P&gt;On Map A, Click Map B -- raises event&lt;/P&gt;&lt;P&gt;On Map A, Click an Attribute Table from A -- no event&lt;/P&gt;&lt;P&gt;On Map A, Click an Attribute Table from B -- raises event&lt;/P&gt;&lt;P&gt;On Attribute Table from A, Click Map A -- no event&lt;/P&gt;&lt;P&gt;On Attribute Table from A, Click Attribute Table from B -- raises event&lt;/P&gt;&lt;P&gt;On Map A, Click Catalog pane -- no event (because no active map)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would ideally apply to all panes that have an active map, including Layouts, Fields, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Originally I was using&amp;nbsp;ActiveMapViewChangedEvent, but (similar to the &lt;A _jive_internal="true" href="https://community.esri.com/thread/248953-activemapviewchanged-event-fires-twice" target="_blank"&gt;issue linked&lt;/A&gt; above), I was getting too many events,&amp;nbsp;when switching to attribute tables (first to null, then to the new map).&amp;nbsp; For a while I was handling&amp;nbsp;ActivePaneChangedEvent, and extracting the Map URI separately depending on what type of pane it was.&amp;nbsp; Unfortunately the Map doesn't always exist at the time of Pane changed.&amp;nbsp; As a result, I switched back to&amp;nbsp;&lt;SPAN&gt;ActiveMapViewChanged, but added a class-level variable to track to last non-empty URI.&amp;nbsp; Now, I'm able to raise the different-map event when the incoming&amp;nbsp;IncomingView's Map's URI is different than the last non-empty URI.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnActiveMapViewChanged&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ActiveMapViewChangedEventArgs args&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; inURI &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; args&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IncomingView&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;URI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrWhiteSpace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inURI&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Compare&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;_lastUri&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inURI&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// Raise my different-map event&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrWhiteSpace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inURI&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; _lastUri &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; inURI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which is working somewhat better, but still seems to have a few inconsistencies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this a good approach? Do you have any other recommendations?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765087#M390</guid>
      <dc:creator>Justin_ODell</dc:creator>
      <dc:date>2021-12-12T08:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Missing/Empty MapURI</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765088#M391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;I am also seeing that the MapURI property is empty in the ActivePaneChangedEvent handler.&amp;nbsp; This is happening because this event is triggered &lt;SPAN style="text-decoration: underline;"&gt;before&lt;/SPAN&gt; the Table pane (in your case) has been initialized (which is when the MapURI will exist).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To account for this, I subscribed to the ActivePaneInitializedEvent when the MapURI was empty - This seems to do the trick. I get a valid MapURI at this point.&amp;nbsp;Code snippet below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But - you could also simply only use the ActivePaneInitializedEvent. Based on your workflow (comparing the Map URIs to know if it is a completely new map), just this one event might give you all you need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//Somewhere subscribe to ActivePaneChangedEvent&lt;/SPAN&gt;

ArcGIS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Desktop&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Framework&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Events&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ActivePaneChangedEvent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Subscribe&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OnActivePaneChanged&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnActivePaneInitialized&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ActivePaneInitializedEventArgs args&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Pane initialized"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; activePane &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; FrameworkApplication&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Panes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ActivePane &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; TOCActiveMapViewProviderPane&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;activePane &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      _mapURI &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; activePane&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapURI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"mapURI: {_mapURI}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;      
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnActivePaneChanged&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PaneEventArgs args&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IncomingPane &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; inPane &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; args&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IncomingPane &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; TOCActiveMapViewProviderPane&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="comment token"&gt;//var mapViewURI = inPane?.MapView?.Map.URI;//empty string&lt;/SPAN&gt;
      _mapURI &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; inPane&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapURI&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//empty string    &lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;_mapURI&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        ActivePaneInitializedEvent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Subscribe&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OnActivePaneInitialized&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;       
      System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;"Debug Message. GetTypeName: {args.IncomingPane.GetType().Name}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"mapURI: {_mapURI}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:29:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/missing-empty-mapuri/m-p/765088#M391</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2021-12-12T08:29:34Z</dc:date>
    </item>
  </channel>
</rss>

