<?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: import MXD not working in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795734#M1800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I am not getting any error messages at this stage.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2020 14:54:53 GMT</pubDate>
    <dc:creator>SteveScott</dc:creator>
    <dc:date>2020-02-05T14:54:53Z</dc:date>
    <item>
      <title>import MXD not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795732#M1798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot import an mxd. It saves as a blank document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following code:&amp;nbsp;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #6a9955;"&gt;&amp;nbsp; &amp;nbsp; #Open&amp;nbsp;the&amp;nbsp;blank&amp;nbsp;project&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_blank&amp;nbsp;=&amp;nbsp;arcpy.mp.ArcGISProject(aprx_path_blank)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#create&amp;nbsp;a&amp;nbsp;copy&amp;nbsp;of&amp;nbsp;the&amp;nbsp;blank&amp;nbsp;project&amp;nbsp;to&amp;nbsp;the&amp;nbsp;local&amp;nbsp;drive&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_path&amp;nbsp;=&amp;nbsp;temp_path&amp;nbsp;/&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"aprx_temp.aprx"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_path_string&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;str&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(aprx_path)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;os.path.exists(aprx_path_string):&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;os.remove(aprx_path_string)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_blank.saveACopy(aprx_path_string)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_copy&amp;nbsp;=&amp;nbsp;arcpy.mp.ArcGISProject(aprx_path_string)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#Import&amp;nbsp;the&amp;nbsp;mxd&amp;nbsp;into&amp;nbsp;the&amp;nbsp;copy&amp;nbsp;projet&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mxd_path_string&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;str&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(root&amp;nbsp;/&amp;nbsp;directory&amp;nbsp;/&amp;nbsp;(file_name&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;".mxd"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_copy.importDocument(mxd_path_string)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aprx_copy.save()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mxd_path_string is a valid URI that points to the correct map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I open the aprx_temp.aprx file in ArcGIS Pro, the map is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why isn't save working?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 17:41:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795732#M1798</guid>
      <dc:creator>SteveScott</dc:creator>
      <dc:date>2020-02-04T17:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: import MXD not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795733#M1799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;A href="https://community.esri.com/migrated-users/377681"&gt;Steve Scott&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting any error messages when you run the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;If this answer has helpful please mark it as helpful. If this answer solved your question please mark it as the answer to help others who have the same question.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 22:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795733#M1799</guid>
      <dc:creator>BenTurrell</dc:creator>
      <dc:date>2020-02-04T22:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: import MXD not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795734#M1800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I am not getting any error messages at this stage.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2020 14:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795734#M1800</guid>
      <dc:creator>SteveScott</dc:creator>
      <dc:date>2020-02-05T14:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: import MXD not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795735#M1801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is interesting, though. In my script it is behaving like it is being imported. I change the MXD and the result changes correctly later on when I publish. But when I check the aprx it is empty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:41:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795735#M1801</guid>
      <dc:creator>SteveScott</dc:creator>
      <dc:date>2020-02-05T15:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: import MXD not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795736#M1802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sounds like the Mxd is loading into the aprx correctly; although the problem is typically that Maps do not 'Open' by default.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the newly copied aprx, can you check the Catalog, and see if there is an additional Map within there. There should be one called the same&amp;nbsp;thing as the Mxd Data Frame (by default this would be 'Layers').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="480552" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/480552_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This new map, should be the imported Mxd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A good indication is just to quickly compare the sizes of the aprx files. The newly created one should be slightly larger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps but let me know if this isn't the issue,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 03:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795736#M1802</guid>
      <dc:creator>JoshuaWatson1</dc:creator>
      <dc:date>2020-02-07T03:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: import MXD not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795737#M1803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I see it in the catalog. It is interesting because the project is only 24kb so I assumed it didn't import. Must be in the geodatabase. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 17:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/import-mxd-not-working/m-p/795737#M1803</guid>
      <dc:creator>SteveScott</dc:creator>
      <dc:date>2020-02-10T17:24:46Z</dc:date>
    </item>
  </channel>
</rss>

