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

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

.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