Application Object (ActiveX)

An instance of the AutoCAD application.

Supported Platforms: Windows only

Class Information

Class Name

AcadApplication

Object Inheritance
Object
   AcadApplication
Create Using

VBA

GetObject("AutoCAD.Application.23")
CreateObject("AutoCAD.Application.23")
Access Via

VBA

object.Application

Members

These members are part of this object:

Remarks

The properties that are associated with the Application object reflect the properties of the main application window. The methods control the loading or listing of the currently loaded external applications and interface objects.

The active document (AutoCAD drawing) can be accessed with the ActiveDocument property.

To access the Application object from VBA, use Thisdrawing.Application. To access the Application object from VB, use the Visual Basic 7 functions GetObject or CreateObject.

If AutoCAD is running, the GetObject function will retrieve the current AutoCAD Application object. When running multiple sessions of AutoCAD, the GetObject function will return the first instance of AutoCAD in the Windows Running Object Table. See the Microsoft Visual Basic 6 documentation for the Running Object Table (ROT) and the GetObject function (for more information about verifying the session returned by GetObject).

Use version-dependent ProgIDs. If a CreateObject or GetObject function uses a version-independent ProgID, change the function to use a version-dependent ProgID. For example, you would change CreateObject("AutoCAD.Application") to CreateObject("AutoCAD.Application.23").

The application object is also the Global object for the ActiveX interface. This means that all the methods and properties for the Application object are available in the global name space.

Use the Quit method to end the AutoCAD session.