Share
 
 

About Determining the Function You Need (AutoLISP/ActiveX)

AutoLISP ActiveX functions provide access to ActiveX methods.

Note: ActiveX support in AutoLISP is limited to Windows only.

For example, look at the following AutoLISP statement, which was entered at the Command prompt:

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

#<VLA-OBJECT IAcadCircle 03ad067c>

This statement 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 Reference. If you look up the definition for the Circle object, here's what the entry looks like:

Sometimes, as in this Circle topic, 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 AutoLISP function that implements the method. In this example, it is vla-AddCircle.

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

Was this information helpful?