ArcObjects Library Reference (ArcMapUI)  

IMxDocument Interface

Provides access to members that control the Mx Document.

Product Availability

Available with ArcGIS Desktop.

Members

Description
Read-only property ActivatedView The activated view. This is the same as the active view unless a data frame is activated within a layout.
Read/write property ActiveView The active view.
Read-only property ActiveViewCommand The command associated with the active view.
Method AddLayer Adds a layer to the current focus map.
Method CanInsertObject Indicates if the document allows objects to be inserted.
Read-only property ContentsView The contents view at the specified index.
Read-only property ContentsViewCount The number of contents views in the document.
Read/write property ContextItem The last item that was right-clicked.
Read/write property CurrentContentsView The current contents view of the document.
Read/write property CurrentLocation The current mouse location in map units.
Read/write property DefaultColor The default color for the given type.
Read/write property DefaultTextFont The default font for text.
Read/write property DefaultTextFontSize The default font size for text.
Write-only property DelayUpdateContents Indicates document update notifications should be ignored.
Read-only property FocusMap The current focus map.
Method InsertObject Inserts an object into the document. Displays the insert object dialog.
Read-only property Maps The collection of maps in the document.
Read-only property OperationStack The operation stack.
Read/write property PageLayout The page layout.
Read/write property RelativePaths Indicates if path names are stored relative to the document.
Read-only property SearchTolerance The global search tolerance in geographic units for selection.
Read/write property SearchTolerancePixels The global search tolerance in pixels for selection.
Read-only property SelectedItem The selected item in the layer control.
Read-only property SelectedLayer The selected layer in the layer control.
Read-only property StyleGallery Reference to the document's Style Gallery.
Read-only property TableProperties Table properties, for Layers and Tables in ArcMap.
Method UpdateContents Notifies the document that the contents have been updated.

CoClasses that implement IMxDocument

CoClasses and Classes Description
MxDocument ESRI Mx Document.

Remarks

This interface is a starting point for much of the other objects in ArcMap.  For example, this interface provides access to the current active view, the currently selected map, all of the maps, and the style gallery.  This interface also has many properties reflected in the running application including: the text font, the text size, and the search tolerance.  Almost every ArcMap customization uses IMxDocument one way or another.

Obtain a reference to this interface via IApplication::Document.

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.