About Obtaining an ActiveX Property With Vlax-get-property (AutoLISP)

The vlax-get-property function returns the property of an object. The function requires the following arguments:

For example, there is no wrapper function available to obtain the CommandBars property of an Microsoft Word application object, but the following command achieves this:

(setq ComBars (vlax-get-property msw 'CommandBars))

#<VLA-OBJECT CommandBars 0016763c>

You can use vlax-get-property (and vlax-invoke-method and vlax-put-property) even if a wrapper function is available for the task. For example, the following returns the AutoCAD's ActiveDocument property:

(vlax-get-property acadObject 'ActiveDocument)

#<VLA-OBJECT IAcadDocument 00302a18>

In this instance, you could have instead used vla-get-ActiveDocument to obtain the ActiveDocument property.