About Methods that Return Values in Arguments (AutoLISP/ActiveX)

Some ActiveX methods require that you supply them with variables into which the methods can place values.

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

The GetBoundingBox method is an example of this type of method. The MinPoint and MaxPoint parameters are described as output only. You must provide output arguments as quoted variable names. The following example shows an AutoLISP function call to return the minimum and maximum bounding points of a circle:

(vla-getboundingbox myCircle 'minpoint 'maxpoint)
nil

The values output by vla-getboundingbox are stored in the MinPoint and MaxPoint variables as safearrays of three doubles. You can view the values using vlax-safearray->list:

(vlax-safearray->list minpoint)
(1.0 1.0 -1.0e-008)

(vlax-safearray->list maxpoint)
(5.0 5.0 1.0e-008)
Note: The quoted symbol parameters you pass to the function become AutoLISP variables just like the ones created through setq. Because of this, you should include them as local variables in your function definition so they do not become global variables by default.