vlaxputproperty
vlax-put-property is a Visual LISP function used to assign a value to a property on a COM/ActiveX object from within AutoCAD and other VLISP-enabled environments. It is part of the vlax- family of functions that provide integration with COM automation, allowing Visual LISP code to interact with external applications and objects.
vlax-put-property object property value
- object: a COM object or a Visual LISP wrapper created with vlax-create-object or obtained from other
- property: the name of the property to set, supplied as a symbol or a string. If the
- value: the value to assign to the property. VLisp handles conversion to the appropriate COM/variant type.
- The function sets the specified property and returns the assigned value, or signals an error if
- Property names are generally case-insensitive for COM objects.
- For complex properties (such as array or indexed properties), the value may need to be a
- If the target object is invalid or not a COM object, an error is raised.
- Set a window or document property:
(vlax-put-property acadDoc 'ActiveSpace 4)
- Show or hide an application window (example with Excel):
(vlax-put-property excelApp 'Visible 1)
See vlax-get-property for reading properties and vlax-invoke or vlax-invoke-method for calling methods on COM objects.