<?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 properly duplicate a map in ArcGIS using arcpy? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1624390#M96714</link>
    <description>&lt;P&gt;this code sometimes work, others don't understand why, not:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;SystemError&lt;/SPAN&gt;: &amp;lt;built-in method copyItem of MappingArcGISProjectObject object at 0x00000287B656FF30&amp;gt; returned a result with an exception set&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Jun 2025 16:35:48 GMT</pubDate>
    <dc:creator>VittorioGalletto</dc:creator>
    <dc:date>2025-06-17T16:35:48Z</dc:date>
    <item>
      <title>How to properly duplicate a map in ArcGIS using arcpy?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1579657#M92391</link>
      <description>&lt;P&gt;I have a map with more than 60 layers and I want to duplicate the map many times using arcpy. I use aprx.createMap() to create an empty map and .addLayer to add layers in the loop from the "template" map. The thing is that the order of layers in the resulting map is different than in the template one. I monitor the process with prints, the iteration of adding the layers looks fine but the output is different.&lt;/P&gt;&lt;P&gt;How to do it properly so that order of layers is identical?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, B&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 19:32:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1579657#M92391</guid>
      <dc:creator>Sfortunatamente</dc:creator>
      <dc:date>2025-01-28T19:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly duplicate a map in ArcGIS using arcpy?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1579745#M92400</link>
      <description>&lt;P&gt;You can use ArcGISProject object method .copyItem() to make an exact copy of the map within the same project.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It would look something like below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy

aprx = arcpy.mp.ArcGISProject('CURRENT')

map_obj = aprx.listMaps('TEMPLATE_MAP')[0]
map_copy = aprx.copyItem(map_obj, 'NEW_MAP')

# Further operation on the map_copy object here

aprx.save()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 21:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1579745#M92400</guid>
      <dc:creator>Marshal</dc:creator>
      <dc:date>2025-01-28T21:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly duplicate a map in ArcGIS using arcpy?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1579756#M92401</link>
      <description>&lt;P&gt;Works like magic! Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 21:56:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1579756#M92401</guid>
      <dc:creator>Sfortunatamente</dc:creator>
      <dc:date>2025-01-28T21:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly duplicate a map in ArcGIS using arcpy?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1624390#M96714</link>
      <description>&lt;P&gt;this code sometimes work, others don't understand why, not:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;SystemError&lt;/SPAN&gt;: &amp;lt;built-in method copyItem of MappingArcGISProjectObject object at 0x00000287B656FF30&amp;gt; returned a result with an exception set&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jun 2025 16:35:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-properly-duplicate-a-map-in-arcgis-using/m-p/1624390#M96714</guid>
      <dc:creator>VittorioGalletto</dc:creator>
      <dc:date>2025-06-17T16:35:48Z</dc:date>
    </item>
  </channel>
</rss>

