Select to view content in your preferred language

Deterimine version of MXD from Python?

1566
10
12-20-2012 09:09 AM
BillWiesepape
Deactivated User
I'm using ArcGIS 10.0 and arcpy.mapping.ListLayers to iterate through the layers in a list of MXDs. my problem is that someon has saved a 10.1 mxd somewhere in the list of MXDs I'm working through. I'd be fine with just skipping that file, but how do I determine what version a MXD file is from Python?
0 Kudos
10 Replies
MichaelVolz
Esteemed Contributor
ArcMap v10.0 sp5 does solve this problem.  Although you can not determine the version of an mxd in python, python will throw an exception instead of completely crashing if it encounters an ArcMap v10.1 mxd file.  So if you are processing a large batch of mxds, you can use try except to catch ArcMap v10.1 files and then move on to the next mxd without processing the file.
0 Kudos