This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Classes > M > MapDocument CoClass (ArcObjects .NET 10.4 SDK) |
The MapDocument coclass is used to read and write map document files.
The MapDocument CoClass encapsulates map document files (*.mxd, *mxt, *.pmf) and layer files (*.lyr) and provides properties and methods for: accessing and updating the contents of a document; determining document properties; and reading, writing and saving map documents files (*.mxd).
Interfaces | Description |
---|---|
IDocumentInfo | Provides access to members that control the Document Info. |
IDocumentInfo2 | Provides access to members that control the Document Info. |
IDocumentPreview | Provides access to members that control the Document Preview. |
IDocumentVersion (esriSystem) | Provides access to members that control the document version. |
IMapDocument | Provides access to members that control the reading and writing of map document files. |
When opening or creating a map document with the IMapDocument Open() or New() methods, you should always make subsequent calls to IActiveView::Activate() in order to properly initialize the display of the PageLayout and Map objects. Call Activate() once for the PageLayout and once for each Map you will be working with. If your application has a user interface, you should call Activate() with the hWnd of the application's client area. If your application runs in the background and has no windows, you can always get a valid hWnd from the GDI GetDesktopWindow() function, part of the Win32 API.