<?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: How to add mapx silently without opening tab in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865606#M4924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea &lt;A href="https://community.esri.com/group/3979"&gt;ArcGIS Pro SDK&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2020 07:21:26 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-08-20T07:21:26Z</dc:date>
    <item>
      <title>How to add mapx silently without opening tab</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865605#M4923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently trying to find a way of adding mapx into project silently instead of loading the map pane.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because the tool I create require to be active at current layout, after the mapx is added, it is switched back to map pane.&lt;/P&gt;&lt;P&gt;Any way I can achieve without switching to map pane?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any&amp;nbsp; idea &lt;A href="https://community.esri.com/migrated-users/86730" target="_blank"&gt;Uma Harano&lt;/A&gt;‌, &lt;A href="https://community.esri.com/migrated-users/10927" target="_blank"&gt;Wolfgang Kaiser&lt;/A&gt;‌?&lt;/P&gt;&lt;P&gt;Below is the code I use at the moment. Pro version is 2.5&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; IProjectItem mapX &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ItemFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;"&lt;SPAN class="comment token"&gt;///mapx file path") as IProjectItem;&lt;/SPAN&gt;
                        
                        

                        &lt;SPAN class="keyword token"&gt;bool&lt;/SPAN&gt; isAdd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Project&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;AddItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mapX&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;//After Queuetask await is done, the current active layout pane switch to newly added map pane&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:45:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865605#M4923</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T10:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to add mapx silently without opening tab</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865606#M4924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea &lt;A href="https://community.esri.com/group/3979"&gt;ArcGIS Pro SDK&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2020 07:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865606#M4924</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-20T07:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to add mapx silently without opening tab</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865607#M4925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find the information you're looking for here:&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Content-and-Items#itemfactory-and-import" title="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Content-and-Items#itemfactory-and-import" rel="nofollow noopener noreferrer" target="_blank"&gt;ProConcepts Content and Items · Esri/arcgis-pro-sdk Wiki · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In code it would look like this (needless to say you can drop the pmi==null check in your code):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;IProjectItem mapX &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ItemFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;@"c:\temp\TheMap.mapx"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IProjectItem&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
IProjectMultiItem pmi &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mapX &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IProjectMultiItem&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;pmi &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; MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Does not implement IProjectMultiItem"&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;else&lt;/SPAN&gt; Project&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ImportItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pmi&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:45:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865607#M4925</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T10:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to add mapx silently without opening tab</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865608#M4926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank &lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I am aware of that content, but I thought it is only for old arcmap items only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't know that ImportItem method can be used with mapx as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It Solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2020 08:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-add-mapx-silently-without-opening-tab/m-p/865608#M4926</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-21T08:05:24Z</dc:date>
    </item>
  </channel>
</rss>

