Reading Object Properties
 
 
 

Functions that read object properties are named with a vla-get prefix and require the following syntax:

(vla-get-propertyobject)

For example, vla-get-center returns the center point of a circle.

To obtain an object's property and apply the property to a new object

  1. Enter the following at the VLISP Console prompt:
    (setq myCircle (vla-addcircle
    mspace (vlax-3d-point 
    
      (getpoint "\nPick
    the center point for a circle: ")) 2.0))
    

    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-addcir-cle.

  2. Use vla-get-center to draw a second circle concentric to the first:
    (vla-addCircle mSpace
    (vla-get-center myCircle) 1.0)
    

    The AutoCAD drawing window now contains the following objects: