Understanding the ActiveX Code in Gp:drawOutline

The gp:drawOutline function issues ActiveX calls to display the path's polyline border in AutoCAD. The following code fragment uses ActiveX to draw the border:

;; Add polyline to the model space using ActiveX automation.
(setq pline (vla-addLightweightPolyline
              *ModelSpace*	; Global Definition for Model Space
              VLADataPts	; vertices of path boundary
            ) ;_ end of vla-addLightweightPolyline
) ;_ end of setq
(vla-put-closed pline T)

The names of all AutoLISP ActiveX functions that work on AutoCAD objects are prefixed with vla-. For example, addLightweightPolyline is the name of an ActiveX method, and vla-addLightweightPolyline is the AutoLISP function that invokes this method. The vla-put-closed call updates the closed property of the pline object, the polyline drawn by vla-addLightweightPolyline.

The Automation objects that factor into AutoLISP ActiveX calls abide by a few standard rules: