codebase="hhctrl.ocx#Version=4,73,8561,0"> codebase="hhctrl.ocx#Version=4,73,8561,0" > codebase="hhctrl.ocx#Version=4,73,8561,0" >
 
  Application object

An instance of the AutoCAD application.

VBA class name:

AcadApplication 

Create using:

For VB:
GetObject("AutoCAD.Application.16")
CreateObject("AutoCAD.Application.16")
For AutoCAD VBA:
Not applicable. The application is always available. 

Access via:

Application property 

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 6 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.16").

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.

Methods

Eval

GetAcadState

GetInterfaceObject

ListARX

LoadARX

LoadDVB

Quit

RunMacro

StatusID

UnloadARX

UnloadDVB

Update

ZoomAll

ZoomCenter

ZoomExtents

ZoomPickWindow

ZoomPrevious

ZoomScaled

ZoomWindow  

Properties

ActiveDocument

Application

Caption

Documents

FullName

Height

HWND

HWND32

LocaleID

MenuBar

MenuGroups

Name

Path

Preferences

StatusID

VBE

Version

Visible

Width

WindowLeft

WindowState

WindowTop  

Events

AppActivate

AppDeactivate

ARXLoaded

ARXUnloaded

BeginCommand

BeginFileDrop

BeginLISP

BeginModal

BeginOpen

BeginPlot

BeginQuit

BeginSave

EndCommand

EndLISP

EndModal

EndOpen

EndPlot

EndSave

LISPCancelled

NewDrawing

SysVarChanged

WindowChanged

WindowMovedOrResized  

 

   Comments?