<?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 Importing a layout does not preserve Map frame-map connection in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/importing-a-layout-does-not-preserve-map-frame-map/m-p/782693#M1182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Environment: ArcGIS Pro 2.5&lt;/P&gt;&lt;P&gt;ArcGIS Desktop Layout DLL version:&amp;nbsp;12.4.0.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While trying to export and import the same layout, I am losing the map frame's map connection in the layout. If I export the layout and open it normally in ArcGIS Pro, the 'map frame - map' connection is preserved. But, when I do the same using the ArcGIS Pro SDK, the 'map frame-map' connection is lost.&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;//Export the layout&lt;/SPAN&gt;
Layout&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SaveAsFile&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layoutFilePath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 

&lt;SPAN class="comment token"&gt;//Import the layout&lt;/SPAN&gt;
Item importedProjectItem &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;layoutFilePath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ItemFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ItemType&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PathItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

List&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; layoutProjectItemsBeforeImport &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;GetItems&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;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="token function"&gt;ToList&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="comment token"&gt;//Add the imported item to the current project&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;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;IProjectItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;importedProjectItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//Find the newly added layout project item&lt;/SPAN&gt;
LayoutProjectItem importedLayoutProjectItem &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;GetItems&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;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="token function"&gt;FirstOrDefault&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;layoutProjectItemsBeforeImport&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Contains&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&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="comment token"&gt;//Get the layout&lt;/SPAN&gt;
newLayout &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; importedLayoutProjectItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetLayout&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The imported layout (newLayout) does not contain the 'map frame - map' connection. ie. the map frame is empty instead of&amp;nbsp;pointing to the actual map.&amp;nbsp;Is this a bug with the SDK or am I doing something wrong here?&amp;nbsp;Any insight would be appreciated. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:54:31 GMT</pubDate>
    <dc:creator>AnandhaSudhan</dc:creator>
    <dc:date>2021-12-12T08:54:31Z</dc:date>
    <item>
      <title>Importing a layout does not preserve Map frame-map connection</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/importing-a-layout-does-not-preserve-map-frame-map/m-p/782693#M1182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Environment: ArcGIS Pro 2.5&lt;/P&gt;&lt;P&gt;ArcGIS Desktop Layout DLL version:&amp;nbsp;12.4.0.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While trying to export and import the same layout, I am losing the map frame's map connection in the layout. If I export the layout and open it normally in ArcGIS Pro, the 'map frame - map' connection is preserved. But, when I do the same using the ArcGIS Pro SDK, the 'map frame-map' connection is lost.&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;//Export the layout&lt;/SPAN&gt;
Layout&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SaveAsFile&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layoutFilePath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 

&lt;SPAN class="comment token"&gt;//Import the layout&lt;/SPAN&gt;
Item importedProjectItem &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;layoutFilePath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ItemFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ItemType&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PathItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

List&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; layoutProjectItemsBeforeImport &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;GetItems&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;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="token function"&gt;ToList&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="comment token"&gt;//Add the imported item to the current project&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;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;IProjectItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;importedProjectItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//Find the newly added layout project item&lt;/SPAN&gt;
LayoutProjectItem importedLayoutProjectItem &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;GetItems&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;LayoutProjectItem&lt;SPAN class="operator token"&gt;&amp;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="token function"&gt;FirstOrDefault&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;layoutProjectItemsBeforeImport&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Contains&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&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="comment token"&gt;//Get the layout&lt;/SPAN&gt;
newLayout &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; importedLayoutProjectItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetLayout&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The imported layout (newLayout) does not contain the 'map frame - map' connection. ie. the map frame is empty instead of&amp;nbsp;pointing to the actual map.&amp;nbsp;Is this a bug with the SDK or am I doing something wrong here?&amp;nbsp;Any insight would be appreciated. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/importing-a-layout-does-not-preserve-map-frame-map/m-p/782693#M1182</guid>
      <dc:creator>AnandhaSudhan</dc:creator>
      <dc:date>2021-12-12T08:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a layout does not preserve Map frame-map connection</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/importing-a-layout-does-not-preserve-map-frame-map/m-p/782694#M1183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anandha,&lt;/P&gt;&lt;P&gt;I am not able to see this problem in ArcGIS Pro 2.6. ArcGIS Pro 2.6 is set to release end of this month. Can you please check on this version and see if you can reproduce the problem?&lt;/P&gt;&lt;P&gt;Thank you for reporting this!&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 14:40:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/importing-a-layout-does-not-preserve-map-frame-map/m-p/782694#M1183</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-07-17T14:40:24Z</dc:date>
    </item>
  </channel>
</rss>

