Text equivalent of Mxd

181
2
05-19-2019 10:16 PM
JosephJose
New Contributor III

Is there a python script that can get me the text equivalent of an Mxd.

The problem is here-

* There is a repository of Mxd

* It's open to many people and many make changes

* I have source compare utility and preferably, if I get a script of the current Mxd from two people, I can compare the changes and bring them in. It's a pain opening up the interfaces one by one and minute changes are easily missed

0 Kudos
2 Replies
ChrisTognela
New Contributor II

Sadly, I think you're out of luck. MXD is a binary format, so text isn't going to work. You can open an MXD in 7zip, but the resulting contents is obtuse, to say the least.

You might have better luck with ArcGIS Pro. Maps can be exported as mapx files, which are JSON. See this page:

https://pro.arcgis.com/en/pro-app/help/sharing/overview/save-a-map-file.htm

If I were to try to get an MXD back to where I could compare it with git or similar, I would think about breaking it into components. Chief among these, exporting layers in the dataframe out as layer files. Although they are still binary data, git should only catch the ones that are different, and allow you to keep the repo up to date. 

You might have to knock together a custom text format, in JSON say, that describes the order of layers and other little particulars so that the map can be put back together the same way when required.

Good luck,

Chris

0 Kudos
JosephJose
New Contributor III

Thanks for the same.

The Mxd list is so high and many people make those minute changes that cannot easily be detected by the naked eye. Guess I am out of luck

0 Kudos