IDocument Interface

IDocument Interface | Send Feedback
See Also Members Example

Allows access to a document.

# Syntax

Visual Basic |
--- | ---
    Public Interface IDocument

C# |
--- | ---
    public interface IDocument

JavaScript |
--- | ---
    Object dsDocument

COM native C++ |
--- | ---
    interface IDocument

C++ |
--- | ---
    class dsDocument

# Example

This code snippet shows how to get the active document.

#### COM native C++

//Get active document

CComQIPtr<IDocument> m_DsActiveDoc;

m_DsActiveDoc = m_DsApp->GetActiveDocument();

# Example

Fire Application and Document Events (C#)
Fire Application and Document Events (VB.NET)
Fire Application and Document Events (VBA)
Get and Set Document Settings (C#)
Get and Set Document Settings (VB.NET)
Get and Set Document Settings (VBA)
Get and Set Block Definitions, Block Instances, and BlockAttribute Instances (C#)
Get and Set Block Definitions, Block Instances, and BlockAttribute Instances (VB.NET)
Get and Set Block Definitions, Block Instances, and BlockAttribute Instances (VBA)
Get and Set Print Options (C#)
Get and Set Print Options (VB.NET)
Get and Set Print Options (VBA)
Switch Layouts (C#)
Switch Layouts (VB.NET)
Switch Layouts (VBA)
Insert Lines and Angular Dimension (JavaScript)
Create Circles on Different Layers (JavaScript)
Insert Block, Notes, and Sketch Entities (JavaScript)
Insert Splines (JavaScript)
Insert HyperLink (JavaScript)
Insert and Dimension Sketch (JavaScript)
Mirror Entities (JavaScript)
Add and Modify Custom Data (JavaScript)
Insert Hatch (JavaScript)
Create Model and Sheet Views (JavaScript)

# Accessors

IApplication::GetActiveDocument

IApplication::GetDocuments

IApplication::NewDocument

IApplication::OpenDocument2

IApplication::Recover

# Object Model

Document

# See Also

####

IDocument Members
Interop.dsAutomation Namespace
IDocument Event DestroyNotify
IDocument Event FileSavePostNotify
IDocument Event FileSavePreNotify
IDocument Event ModifyNotify