About Determining the Visual LISP Function You Need (AutoLISP/ActiveX)

The Visual LISP ActiveX functions actually provide access to ActiveX methods. For example, look at the following AutoLISP statement, which was entered at the Visual LISP Console prompt:

(setq mycircle (vla-addCircle mSpace (vlax-3d-point '(3.0 3.0 0.0)) 2.0))

#<VLA-OBJECT IAcadCircle 03ad067c>

This command adds a circle to a drawing, using the Addcircle method. The function called to draw the circle is vla-addCircle.

If you do not know what function adds a circle to an AutoCAD drawing, you can figure it out by looking in the ActiveX and VBA Reference. If you look up the definition for a Circle object, here's what the entry looks like:

Sometimes, as in this Circle entry, there is descriptive text that identifies the method you need. Often, though, you will need to look through the list of methods to find the one that matches the action you want to take.

Once you find the name of the method, add a vla- prefix to the method name to get the name of the Visual LISP function that implements the method. In this example, it is vla-AddCircle.

Note: In Visual LISP, function names are not case-sensitive; vla-addcircle is the same as vla-AddCircle.