To obtain an object's property and change the property of an object (AutoLISP/ActiveX)

The value of a an object's property can be set and retrieved using ActiveX functions.

Note: ActiveX support in AutoLISP is limited to Windows only.
  1. At the Visual LISP Console window or AutoCAD Command prompt, enter an AutoLISP statement that gets or creates an object that contains the properties you want to work with.

    For example, this function call prompts you to pick a center point for a circle, then invokes the AddCircle method to draw the circle. The vlax-3d-point function converts the point you pick into the data type required by vla-addcircle.

    (setq 3dpt (vlax-3d-point (getpoint "\nPick the center point for a circle: "))
    (setq myCircle (vla-addcircle mspace 3dpt 2.0))
  2. Enter another AutoLISP statement that retrieves a property of the VLA-object and assigns it to another VLA-object.

    For example, use vla-get-center of a Circle object to draw concentric circles.

    (vla-addCircle mSpace (vla-get-center myCircle) 1.0)