Understanding the ActiveX Code in Gp:drawOutline

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 set
q(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

  • The first argument to a vla-put, vla-get, or vla- method call is the object being modified or queried, for example, *ModelSpace* in the first function call and pline in the second call.
  • The return value of a vla- method call is a VLA-object, which can be used in subsequent calls. For example, vla-addLightweightPolyline yields a return object, pline, that is altered in the next ActiveX call.
  • The ActiveX object model is structured hierarchically. Objects are traversed from
    the application object at the topmost level down to individual drawing primitives,
    such as polyline and circle objects. Thus, the gp:drawOutline function is not yet complete, because the *ModelSpace* automation object must first be accessed through the root application object.

Learning AutoCad

is article explains the risks involved in enabling ActiveX controls and how the … Change ActiveX security settings for Access, Excel, PowerPoint, and Word …. To see an MSDN article on code that a control developer should implement to …ActiveX controls are small apps that allow websites to provide content such as videos and games. … ActiveX Filtering in Internet Explorer prevents sites from installing and using these apps. … Allow Internet Explorer to Download signed ActiveX controls by selecting Enable, or Prompt if …Understanding the Container's Extender Object … an ActiveX Control" uses the following code to initialize its Caption property:ActiveX Viewer and HTML5 Viewer. The ActiveX viewer uses the browsers ActiveX components. The browser from where the connection is established will …… ActiveX controls are binary code capable of taking any action that the … and user to user, it is important to understand the tradeoffs between …