An AutoCAD drawing.
Supported Platforms: Windows only
AcadDocument
Object AcadDatabase AcadDocument
VBA
Documents.Add Documents.Open Document.New
VBA
Documents.Item Application.ActiveDocument
These members are part of this object:
Methods |
Properties |
Events |
---|---|---|
The active document (AutoCAD drawing) can be accessed using ThisDrawing in VBA, or through the ActiveDocument property in VB. Because AutoCAD works with only one document at a time, and that document represents one database, the active document can be thought of as the current database as well as the current document.
Certain objects in the drawing establish the format, location, or style that new objects being added to the drawing will adopt. These objects include the DimensionStyle, TextStyle, Linetype, Viewport, and Layer objects. A drawing may contain many of these types of objects, but only one may be active at a time. For example, there may be several linetypes available in a drawing, but only one, designated as the active one, will be used when creating a new entity. The Document object contains the references to these active objects. To set an existing object as the active object, use the properties listed below.
The Document object also contains a property (or link) for all the collections. From these collections, you can iterate through every object in the drawing.
To access drawing properties such as Title , Subject, Author, and Keywords , the AcadSummaryInfo interface, accessible as a property of the Document object, must be used.
To create or open a Document object, use the Open method.
Releases: AutoCAD 2000 and later