vlax-get-property (AutoLISP/ActiveX)

Retrieves a VLA-object's property

Supported Platforms: Windows only

Signature

(vlax-get-property object property)
object

Type: VLA-object

An object.

property

Type: Symbol or String

Name of the property to be retrieved.

Return Values

Type: Integer, Real, String, List, VLA-object, variant, safearray, T, or nil

The value of the object's property.

Remarks

This function was formerly known as vlax-get.

Examples

Begin by retrieving a pointer to the root AutoCAD object:

(setq acadObject (vlax-get-acad-object))
#<VLA-OBJECT IAcadApplication 00a4b2b4>

Get the AutoCAD ActiveDocument property:

(setq acadDocument (vlax-get-property acadObject 'ActiveDocument))
#<VLA-OBJECT IAcadDocument 00302a18>

The function returns the current document object.

Get the ModelSpace property of the ActiveDocument object:

(setq mSpace (vlax-get-property acadDocument 'Modelspace))
#<VLA-OBJECT IAcadModelSpace 00c14b44>

The model space object of the current document is returned.

Convert a drawing entity to a VLA-object:

(setq vlaobj (vlax-ename->vla-object e))
#<VLA-OBJECT IAcadLWPolyline 0467114c>

Get the color property of the object:

(vlax-get-property vlaobj 'Color)
256