vlax-put-property usage

Discussion in 'AutoCAD' started by David Kozina, Jan 3, 2004.

  1. I think that's what I said.
     
    Tony Tanzillo, Jan 6, 2004
    #21
  2. David Kozina

    John Uhden Guest

    Think again.
    What you said was "(vlax-invoke) handles
    the results of multiple output parameters internally, and
    always returns them as a list of results (and converts to
    LISP types where appropriate)."

    Technically you can claim correctness since nil can be an empty list.
     
    John Uhden, Jan 6, 2004
    #22
  3. John - I don't have to think again, I know exactly
    what I said, and that's exactly what (vlax-invoke)
    does.

    Output parameters in ActiveX are the ones that
    vlax-invoke-method requires quoted symbols for.

    Internally, (vlax-invoke) receives output parameters
    from the ActiveX server by passing it an array of
    variants, which the server fills in with each output
    value, and then (vlax-invoke) gets the value of each
    of those variants and puts them into a list, which
    it returns it as its result.

    That's exactly what (vlax-invoke) does internally.
     
    Tony Tanzillo, Jan 6, 2004
    #23
  4. David Kozina

    John Uhden Guest

    I'm sorry. I don't see where (vlax-invoke) is returning anything to 'MinPt or
    'MaxPt in the example...
    Command: (vlax-invoke Object 'GetBoundingBox 'MinPt 'MaxPt)
    nil
    Command: !minpt
    nil
    Command: !maxpt
    nil
     
    John Uhden, Jan 6, 2004
    #24
  5. John - I don't believe I suggested that. You may be
    misinterpreting what I was referring to by 'output
    parameters'. These are ActiveX parameters, not LISP
    function parameters. If an ActiveX method is declared
    with output paraemters, the client that calls the
    method must supply parameters to receive the output
    (this is ActiveX, not LISP). (vlax-invoke) supplies
    those parameters internally when it calls an ActiveX
    method that takes output params.

    Then it takes the values of those parameters and
    converts to LISP types, returns them in a list.
     
    Tony Tanzillo, Jan 6, 2004
    #25
  6. David Kozina

    John Uhden Guest

    So where are the returns?
     
    John Uhden, Jan 7, 2004
    #26
  7. At the IRS

    Sorry, this has degraded to gibberish and that's where I get off.
     
    Tony Tanzillo, Jan 7, 2004
    #27
  8. I'm not sure I agree. The naming convention of all
    vla-* functions is consistent. vla-get-<propertyname>
    and vla-put-<propertyname> are fairly consistent.

    However, there is one caveat about this, which is
    when a method's name begins with the string "Get"
    (e.g., vla-GetInterfaceObject and vla-GetAttributes
    for example).

    To make my point, just search google on either of
    the following, and you'll see how many times I and
    others have incorrectly used them:

    vla-get-interfaceobject
    vla-get-attributes
     
    Tony Tanzillo, Jan 8, 2004
    #28
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.