Share
 
 

About Using the VLA- Functions With ActiveX Methods (AutoLISP/ActiveX)

A set of functions are added to AutoLISP that provide access to the AutoCAD ActiveX objects when the vl-load-com function is called.

Note: ActiveX support in AutoLISP is limited to Windows only.

These function names are prefixed with vla-: for example, vla-addCircle, vla-get-ModelSpace, vla-put-Color. These functions can be further categorized as follows:

  • vla- functions correspond to every AutoCAD ActiveX method. Use these functions to invoke the method (for example, vla-addCircle invokes the AddCircle method).
  • vla-get- functions correspond to every property, enabling you to retrieve the value of that property (for example, vla-get-Color obtains an object's Color property).
  • vla-put- functions correspond to every property, enabling you to update the value of that property (for example, vla-put-Color updates an object's Color property).

AutoLISP also offers a set of ActiveX-related functions whose names are prefixed with vlax-. These are more general ActiveX functions, each of which can be applied to numerous methods, objects, or properties. For example, with the vlax-get-property function, you can obtain any property of any ActiveX object. If your drawing contains custom ActiveX objects, or if you need to access objects from other applications, such as a Microsoft Excel spreadsheet, you can use the vlax-invoke-method, vlax-get-property, and vlax-put-property functions to access their methods and properties; you'll see examples using these functions in About Using ActiveX without Importing a Type Library (AutoLISP).

Note: AutoCAD LT does not support working with third-party ActiveX libraries, such as Microsoft Excel or Microsoft Word.

Was this information helpful?