Select to view content in your preferred language

import MXD not working

02-04-2020 09:41 AM
New Contributor III

I cannot import an mxd. It saves as a blank document.

I have the following code: 

    #Open the blank project
    aprx_blank =
    #create a copy of the blank project to the local drive
    aprx_path = temp_path / "aprx_temp.aprx"
    aprx_path_string = str(aprx_path)
    if os.path.exists(aprx_path_string):
    aprx_copy =

    #Import the mxd into the copy projet
    mxd_path_string = str(root / directory / (file_name + ".mxd"))

mxd_path_string is a valid URI that points to the correct map.

When I open the aprx_temp.aprx file in ArcGIS Pro, the map is empty.

Why isn't save working?

0 Kudos
5 Replies
Occasional Contributor III

Hey Steve Scott‌,

Are you getting any error messages when you run the script?



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.

New Contributor III

No I am not getting any error messages at this stage.

0 Kudos
New Contributor III

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.

0 Kudos
New Contributor II

Hi Steve,

It sounds like the Mxd is loading into the aprx correctly; although the problem is typically that Maps do not 'Open' by default. 

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 thing as the Mxd Data Frame (by default this would be 'Layers').

This new map, should be the imported Mxd.

A good indication is just to quickly compare the sizes of the aprx files. The newly created one should be slightly larger.

Hope this helps but let me know if this isn't the issue,


New Contributor III

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!

0 Kudos