Select to view content in your preferred language

Is it possible to save mxd to a previous version with ArcGIS Engine?

2869
4
09-11-2012 09:58 AM
ChrisKasturi
New Contributor
This is a post of a way to programmatically save an mxd to a previous version using ArcGIS Desktop.  However, I was wondering whether there is a similar functionality for engine?

Subject Re: Programmatically save a copy 
Author Jeff Matson 
Date Oct 05, 2005 
Message Maybe try this; it seemed to work, you'll have to open the document using a password, in this case it's "open". 
  'add above the application.saveas line
Application.LockCustomization "open", Nothing
 
  Jeff Matson
GIS Programmer/Analyst
matsongis@gmail.com
0 Kudos
4 Replies
DavidLednik
Frequent Contributor
Doesn't look like it.

IMapDocument has Save and SaveAs methods but you can't specify a version

David
0 Kudos
NeilClemmons
Honored Contributor
You should be able to QI from IMapDocument to IDocumentVersion, set the version property and save.
0 Kudos
DavidLednik
Frequent Contributor
True, but you would probably need to open existing MXD, change version and save it as new version?
0 Kudos
NeilClemmons
Honored Contributor
That's pretty much what I said to do:

            Dim mapDocument As IMapDocument = New MapDocument
            mapDocument.Open("C:\temp\myMap_v10.mxd")
            DirectCast(mapDocument, IDocumentVersion).DocumentVersion = esriArcGISVersion.esriArcGISVersion93
            mapDocument.SaveAs("C:\temp\myMap_v93.mxd")
            mapDocument.Close()
0 Kudos