I have to loop through some folders which may contain *.mxd files and change their coordinate system. I already found this piece of Python which should do the trick for ArcGIS 10.x (from here):

prjFile = prjPath + "/" + "NAD 1983 UTM Zone 10N.prj"
sr = arcpy.SpatialReference(prjFile)
for DF in MAP.ListDataFrames(MXD):
    DF.spatialReference = sr

However, it looks like there is nothing similar to the arcpy.mapping module in 10 available in 9.3. I need to access the MXD file and then the dataframe(s) it contains, in order to change the coordinate system.

I could not find anything useful so far, although I assume that other people may have similar issues.

My question therefore, is there any (simple) workaround to this using Python (arcgisscripting) in ArcGIS 9.3?

  • 1
    arcpy.mapping was not available until 10.0 but I think you should be able to use arcgisscripting to access the Project and Project Define tools as appropriate and Python os module to listfiles to find spatial data in your folders.
    – PolyGeo
    Mar 6, 2013 at 23:43
  • @PolyGeo : the tools Project and Define Projection both do not work here, as I only have to change the CS in the dataframe - I do not want to re-project any data.
    – David
    Mar 6, 2013 at 23:49
  • Had assumed you must have been going on to export data in the coordinate system of the data frame but if you are only looking at on-the-fly for display then I think you are at a 9.3 dead end.
    – PolyGeo
    Mar 7, 2013 at 7:42
  • The bigger picture is that we are reprojecting our whole data in another process. However, our users have their MXDs which still link to the same data (with the now new projection) but the data frames will still have the old projection. Therefore I want to change the coordinate systems in the MXD files.
    – David
    Mar 7, 2013 at 19:29

1 Answer 1


Although very easy to do at 10.0, I do not believe it is possible to use Python to update the Coordinate Systems of Data Frames in any straightforward manner at 9.3 and earlier.

Only approaches I can suggest are:

  1. Leave doing this until you can upgrade to 10.x
  2. Look at calling ArcObjects from Python.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.