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


IApplication.Document Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Framework)  

IApplication.Document Property

The document that is currently loaded in the application.

[Visual Basic .NET]
Public ReadOnly Property Document As IDocument
[C#]
public IDocument Document {get;}

Product Availability

Available with ArcGIS Desktop.

Remarks

In ArcMap, the Document is the currently loaded document.
In ArcCatalog, the Document is the Normal template.

Both ArcMap and ArcCatalog applications are composed of several things including a document. The document is an object which controls the representation of data. In ArcMap, the document object is the MxDocument CoClass and in ArcCatalog it is the GxDocument CoClass. Access to these CoClasses is provided through this property.

See Also

IApplication Interface | IDocument Interface | MxDocument Class | GxDocument for use with ArcCatalog Class

.NET Snippets

Open StyleReferencesDialog | Get Command by Name | Open StyleManagerDialog | List ArcMap Visible Toolbars | Use Custom Tool on Windows Form | Get PageLayout from ArcMap | Get MxApplication from ArcMap | Create Context Menu | Find Command and Execute | Get Globe from Application | TimeControl Playback | Set Tool Active in ToolBar | Statements - Use a Tool in a Windows Form | Get MxDocument from ArcMap | Get ActiveView from ArcMap | Get Command on Toolbar by Names | Get Map from ArcMap | Get Contents View from ArcMap | Get Toolbar by Name | Assign Shortcut Key to Command

.NET Samples

Extension implementation (Code Files: SimpleExtension) | Selection restriction evaluator (Code Files: SelectionRestrictionEvaluator) | Automate ArcGIS for Desktop applications (Code Files: Form1) | Implementing a schematic digitizing tool (Code Files: DigitTool) | Layer filtering TOC view (Code Files: TOCLayerFilter) | ArcGIS Network Analyst extension barrier location editor (Code Files: EditorForm) | StreetMap routing (Code Files: RoutingForm) | Create a command by inheriting from BaseCommand (Code Files: ZoomToLayer) | Create a custom tool (Code Files: DrawGraphicLine) | Applying user interface customizations at startup (Code Files: AcmeExt) | Create a custom selection extension by extending ArcObjects (Code Files: SelectionExtension ZoomToLayerMultiItem) | Schematic diagram auto refresh (Code Files: FormAutorefresh) | Simple logging dockable window with a custom context menu (Code Files: LoggingDockableWindow) | Custom feedback tool and font drop-down list tool control (Code Files: FontToolControl) | Migrating from VB6 to VB .NET for ArcGIS 10 (Code Files: clscopy_table_sel) | Extension to listen to document open and save events (Code Files: LogExtension)

.NET Related Topics

ArcMapUI | Create a command by inheriting from BaseCommand | Create a custom tool | How to create AOIs and bookmarks | How to listen to document events | How to use symbol level drawing | How to wire custom events using IActiveViewEvents | Migrating VB6 to VB.NET for ArcGIS 10 | Performing basic map functions | Publisher