VLISP and ActiveX

Discussion in 'AutoCAD' started by aml, Aug 26, 2007.

  1. aml

    aml Guest

    Hi,

    This is a VLISP specific question regarding ActiveX.

    While trying to create a variant containing a safe array, I got one
    unexpected error:

    _$ (vlax-make-variant (vlax-make-safearray vlax-vbDouble '(0 . 2))
    vlax-vbArray)
    ; error: lisp value has no coercion to VARIANT with this type:
    #<safearray...>

    If the proper type is not vlax-vbArray, what is it, then?

    According to AutoLisp Reference entry for vlax-make-variant, it says
    that:

    If you do not specify a type, vlax-make-variant assigns a default
    data type based on the data type of the value it receives. The
    following list identifies the default variant data type assigned to
    each LISP data type:

    ...
    vlax-make-safearray vlax-vbArray

    However, the following expression returns a different value:

    _$ (vlax-variant-type (vlax-make-variant (vlax-make-safearray vlax-
    vbDouble '(0 . 2))))
    8197
    _$ vlax-vbArray
    8192

    So, my question is: what is the proper type that is assigned to
    variants of safearrays?

    Best regards,

    António Leitão.
     
    aml, Aug 26, 2007
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.