sfadum

MapDocument saveACopy to previous version

Discussion created by sfadum on Mar 29, 2010
Latest reply on May 13, 2011 by jbarrette-esristaff
Hi,

I have written a small python script to save the ArcGIS 9.4 files I have created back to version 9.3.

The script seems to run fine, but when I try to open the files in Arc 9.3 I get an error message saying the files have been created in a newer version of ArcGIS.  In the help it says if you do not specify a version number that it defaults to an Arc 9.4 file.  Has anyone had success doing this, or is this a bug, or (most likely) am I doing something wrong.  Here is the script:

import arcpy
from arcpy import env
import os
import arcpy.mapping as MAP

env.workspace = "U:\\Projects_VAN\\1961\\0245\\17\\D-Drafting-Design-Analysis\\GIS\\Projects\\mxds"

for file in arcpy.ListFiles("*.mxd"):
   
    mxdFile = os.path.splitext(file)[0] + ".mxd" 

    MXD = MAP.MapDocument("U:\\Projects_VAN\\1961\\0245\\17\\D-Drafting-Design-Analysis\\GIS\\Projects\\mxds\\" + mxdFile)

    MXD.saveACopy("U:\\Projects_VAN\\1961\\0245\\17\\D-Drafting-Design-Analysis\\GIS\\Projects\\mxds\\93\\" + os.path.splitext(file)[0] + "_V_9_3.mxd", '93')
       
print "Files Saved"

Thanks in advance for your help...

Outcomes