<?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: Conversion of MXDs to APRX Using Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370354#M69656</link>
    <description>&lt;P&gt;I ran the python script in python window. below is the screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="naveenbesri_0-1705383760165.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91656iE2E407DCBC0AB090/image-size/medium?v=v2&amp;amp;px=400" role="button" title="naveenbesri_0-1705383760165.png" alt="naveenbesri_0-1705383760165.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and after that aprx files have been created but no data in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="naveenbesri_1-1705383824302.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91657iD3C0108D4F3B56C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="naveenbesri_1-1705383824302.png" alt="naveenbesri_1-1705383824302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2024 05:43:56 GMT</pubDate>
    <dc:creator>naveenbesri</dc:creator>
    <dc:date>2024-01-16T05:43:56Z</dc:date>
    <item>
      <title>Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367231#M69555</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have been using python script for conversion of MXDs to APRX files. we are able to create the aprx files but when I open its empty no layers or properties in newly converted aprx file. below is the script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import os&lt;BR /&gt;import pathlib&lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;ogDir = r'D:\MXDs'&lt;BR /&gt;dirContents = os.listdir(ogDir)&lt;/P&gt;&lt;P&gt;for folder_path, subfolders, filenames in os.walk(ogDir):&lt;BR /&gt;for file in filenames:&lt;BR /&gt;if file[-4:] == '.mxd':&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject('Current')&lt;BR /&gt;filePath = pathlib.Path(folder_path) / file&lt;BR /&gt;mxd = file[:-4]&lt;BR /&gt;aprx.importDocument(filePath)&lt;BR /&gt;aprx.saveACopy(folder_path + '\\' + mxd + '.aprx')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me out where I can get same as like my MXD into aprx file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 05:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367231#M69555</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2024-01-08T05:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367249#M69556</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In the documentation examples it's noted that the use of the "current" keyword can only works within the arcgis pro python windows.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/mapping/arcgisproject-class.htm" target="_blank" rel="noopener"&gt;ArcGISProject—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To make it work, you need to create manually a blank/empty project and open it explicitly :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx = arcpy.mp.ArcGISProject(&lt;/SPAN&gt;&lt;SPAN class=""&gt;r"C:\Projects\blank.aprx"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 08:36:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367249#M69556</guid>
      <dc:creator>CedricDespierreCorporon</dc:creator>
      <dc:date>2024-01-08T08:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367273#M69557</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/345112"&gt;@CedricDespierreCorporon&lt;/a&gt;&amp;nbsp; I have created blank aprx file and passed the this as parameter. we are getting the below error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 13, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\_mp.py", line 409, in __init__&lt;BR /&gt;self._arc_object = arcgisscripting._mapping.ArcGISProject(*gp_fixargs((aprx_path,), True))&lt;BR /&gt;OSError: D:\mxd_test\blank.aprx&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:27:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367273#M69557</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2024-01-08T10:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367279#M69558</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;usually, OS errors could be related to 3 things :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;error in the path&lt;/LI&gt;&lt;LI&gt;Python user executing the scripts have no rights (file access/read/write) on&amp;nbsp;&lt;SPAN&gt;D:\mxd_test\blank.aprx&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;aprx created on arcgis pro 3.x+ and the machine with the python script is running 2.x&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 10:40:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1367279#M69558</guid>
      <dc:creator>CedricDespierreCorporon</dc:creator>
      <dc:date>2024-01-08T10:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1369954#M69646</link>
      <description>&lt;P&gt;My code looks the same as yours and works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only difference is where your code reads&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;aprx = arcpy.mp.ArcGISProject('Current')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;mine reads&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;aprx = arcpy.mp.ArcGISProject(r'C:\Users\NAME\Documents\ArcGIS\Projects\MyProjectTest\MyProjectTest.aprx')&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I opened a project , saved it, and added the script to run from the toolbox.&lt;/P&gt;&lt;P&gt;If you go to Project Tab &amp;gt; Info there is an easy copy path button for pasting your project name&lt;/P&gt;&lt;P&gt;Also, before hand I went to the Project Tab &amp;gt; Package manager and cloned my environment and updated all my packages&lt;/P&gt;&lt;P&gt;I am running on Pro 3.1.3&lt;/P&gt;&lt;P&gt;Python-2.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 01:41:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1369954#M69646</guid>
      <dc:creator>SYOCSan</dc:creator>
      <dc:date>2024-01-14T01:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370076#M69649</link>
      <description>&lt;P&gt;Hi, I have changed the code as suggested by you created new blank project and passed aprx as parameter to ArcGISProject by removing current. Script ran successfully but the same issue as mentioned above getting same empty aprx file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="naveenbesri_0-1705299645051.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91581iE90A2600152AAD09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="naveenbesri_0-1705299645051.png" alt="naveenbesri_0-1705299645051.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 06:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370076#M69649</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2024-01-15T06:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370084#M69650</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/162655"&gt;@naveenbesri&lt;/a&gt;&amp;nbsp;: the code should create a new map within the project with the MXD layers, and it will not add them to the default opened map. Checks the list of maps it should be there.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 07:37:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370084#M69650</guid>
      <dc:creator>CedricDespierreCorporon</dc:creator>
      <dc:date>2024-01-15T07:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370351#M69655</link>
      <description>&lt;P&gt;Hi, I did the same. Mxds got converted to aprx in the mentioned folder and after that when I open I saw no layers added which I have posted above. Kindly help&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 05:35:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370351#M69655</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2024-01-16T05:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370354#M69656</link>
      <description>&lt;P&gt;I ran the python script in python window. below is the screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="naveenbesri_0-1705383760165.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91656iE2E407DCBC0AB090/image-size/medium?v=v2&amp;amp;px=400" role="button" title="naveenbesri_0-1705383760165.png" alt="naveenbesri_0-1705383760165.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and after that aprx files have been created but no data in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="naveenbesri_1-1705383824302.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91657iD3C0108D4F3B56C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="naveenbesri_1-1705383824302.png" alt="naveenbesri_1-1705383824302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 05:43:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370354#M69656</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2024-01-16T05:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370355#M69657</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first question is what happen if you just use Pro to import the MXD - no Python.&lt;/P&gt;&lt;P&gt;If it gives you the data then it is a python problem.&lt;/P&gt;&lt;P&gt;If it gives you empty map then python have nothing to do here.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 05:44:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370355#M69657</guid>
      <dc:creator>mody_buchbinder</dc:creator>
      <dc:date>2024-01-16T05:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370358#M69658</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/413050"&gt;@mody_buchbinder&lt;/a&gt;&amp;nbsp;I tried to import the MXD everything looks fine. I am able to see the data and layers in TOC.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 09:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370358#M69658</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2024-01-18T09:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion of MXDs to APRX Using Python</title>
      <link>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370378#M69659</link>
      <description>&lt;P&gt;Hello, the file size of each aprx is different so they should not be empty.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CedricDespierreCorporon_0-1705396497683.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91662iCCB7E644CDF5F918/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CedricDespierreCorporon_0-1705396497683.png" alt="CedricDespierreCorporon_0-1705396497683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Imported MXD should be present in a "new" map within the project : you can have multiple maps in one project with arcgis pro.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CedricDespierreCorporon_1-1705396655340.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91663iE2B370580583DB8C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CedricDespierreCorporon_1-1705396655340.png" alt="CedricDespierreCorporon_1-1705396655340.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 09:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/conversion-of-mxds-to-aprx-using-python/m-p/1370378#M69659</guid>
      <dc:creator>CedricDespierreCorporon</dc:creator>
      <dc:date>2024-01-16T09:18:03Z</dc:date>
    </item>
  </channel>
</rss>

