This document is archived and information here might be outdated.  Recommended version.


MxDocument CoClass (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > ArcMapUI > ESRI.ArcGIS.ArcMapUI > Classes > M > MxDocument CoClass (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (ArcMapUI)  

MxDocument CoClass

Esri Mx Document.

Product Availability

Available with ArcGIS Desktop.

Description

The map document (MxDocument) is the ArcMap running application.  The overall role of the map document is to control the representation of data .  This object implements several interfaces including IMxApplication and IDocument.  IMxDocument is a starting point for accessing most of the other ArcMap objects including the collection of maps, the page layout, and the style gallery.  The IDocument interface provides access to the document's title, type, accelerator table, CommandBars collection, and VBA project.

There is one map document per session of ArcMap.  Instantiating a new MxDocument starts a new ArcMap application.  Actually, creating a new MxDocument really creates a new Application object which in turn co-creates a new MxDocument.

To edit the contents of a map document saved to a file (*.mxd) outside of an ArcMap session or without instantiating a new Application (ArcMap process), see IMapDocument.  IMapDocument provides the ability to edit and save the contents of a map document.

Supported Platforms

Windows

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
IBasicDocument Provides access to members that control the Basic Document.
IBasicDocument2 Provides additional access to members that control the Basic Document.
IBasicDocumentDefaultSymbols Provides access to members that control Default basic symbols for the document.
IChangeLayout Provides access to members that control changing the document's layout.
IConnectionPointContainer (esriDisplay)
IContentsViewEdit Provides access to members that control Contents View Edit.
IDataGraphCollection (esriCarto) Provides access to members that control graph collection in map document.
IDataGraphCollectionEvents (esriCarto) Provides access to events that occur when the collection of graphs in the document changes.
IDocument (esriFramework) Provides access to other objects in the document.
IDocumentDatasets (esriCatalogUI) Provides access to members that control the document datasets.
IDocumentDefaultSymbols Provides access to members that control Default Symbols for the document.
IDocumentDirty (esriFramework) Provides access to the dirty flag of the Document.
IDocumentDirty2 (esriFramework) Provides access to the dirty flag of the Document.
IDocumentEvents Provides access to events that occur in ArcMap.
IDocumentEventsDisp Provides access to events that occur in ArcMap.
IDocumentInfo (esriCarto) Provides access to members that control the Document Info.
IDocumentInfo2 (esriCarto) Provides access to members that control the Document Info.
IDocumentPreview (esriCarto) Provides access to members that control the Document Preview.
IDocumentVersion (esriSystem) Provides access to members that control the document version.
IMapDocument (esriCarto) Provides access to members that control the reading and writing of map document files.
IMxDocument Provides access to members that control the Mx Document.
IPersist (esriSystem)
IPropertySupport (esriSystem) Provides access to members that set a default property on an object.
IReportUnitFormat Provides access to report unit formatting.
IReportUnitFormat2 Provides access to report unit formatting.
ISupportErrorInfo (esriSystem)