Provides access to members that control the reading and writing of map document files.
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Description
The IMapDocument interface provides properties and methods for reading map document files (*.mxd, *mxt, *.pmf) and writing and saving changes to map document files (*.mxd). However, since it is not tied to the ArcMap application, application-specific functionality in the MapDocument will not be persisted. Examples of application specific functionality are toolbar settings, UI customizations, VBA projects, and ArcMap graphs. For desktop developers who need to use this functionality, the MxDocument interface located in the ArcMapUI library is a better choice.
Members
All Properties Methods
Description
ActiveView
The ActiveView of the map document.
Close
Close the map document.
DocumentFilename
The map document filename that the MapDocument coclass is linked to.
DocumentType
The type of map document currently loaded in the object.
DocumentVersion
Indicates if the version of the map document is compatible with the current version of software.
GetVersionInfo
Retrieve the detailed version information of the map document.
IsMapDocument
Indicates if the map document is a valid map document.
IsPasswordProtected
Indicates if the map document is protected by a passsword.
IsPresent
Indicates if the map document is present.
IsReadOnly
Indicates if the map document is read only.
IsRestricted
Indicates if the use of the map document is restricted to certain applications.
Layer
The Layer object at the specified index for the specified map.
Map
The Map object at the specified index.
MapCount
The number of Map objects contained within the map document.
New
Creates and opens a new map document in preparation for the contents to be retrieve or updated.
Open
Open the map document in preparation for the contents to be retrieve or updated.
PageLayout
The PageLayout object.
Printer
The printer object. If no printer object is stored in the map document this returns NULL.
ReplaceContents
Replace the contents of the map document.
Save
Save the contents of the map document to the bound file.
SaveAs
Save the contents of the map document to the specified file name.
SetActiveView
Set the ActiveView content of the map document.
Thumbnail
The thumbnail stored in the map document. If this is empty E_FAIL is returned.
UsesRelativePaths
Indicates if the data in the map document is referenced using relative paths.
CoClasses that implement IMapDocument
.NET Samples Synchronized MapControl and PageLayoutControl application (Code Files:
frmMain OpenNewMapDocument ) |
Simple dynamic display application (Code Files:
MainForm ) |
Implementing a property page for an ArcGIS Engine application (Code Files:
frmMain ) |
Load a map document into the PageLayoutControl (Code Files:
LoadMap ) |
Save a layer file in a MapControl application (Code Files:
frmMain ) |
Schematics Engine application (Code Files:
MainForm ) |
Temporal statistics (Code Files:
MainForm ) |
Working with packages in ArcGIS Engine (Code Files:
FrmMapControl )
.NET Related Topics How to access maps and layers via the MapDocument |
How to add a layer to a map from a layer file |
How to add different types of layers to a map |
How to add display caching |
How to create a mosaic layer |
How to create AOIs and bookmarks |
How to load a password-protected document |
How to use symbol level drawing |
Performing basic map functions |
Publisher |
Using ArcObjects as tool input |
Using the PageLayoutControl