VLA & VLAX (unknown functions)

Discussion in 'AutoCAD' started by Steven Craig Basham, Jun 21, 2004.

  1. Hello. I attempted to use a vla function in a LISP routine and kept
    receiving an unknown function error. Do I need to load in a reference
    before using the vla & vlax libraries similarly to VBA? If so, which one?
    Any help on this would be greatly appreciated.

    Regards,
    Steven Craig Basham
     
    Steven Craig Basham, Jun 21, 2004
    #1
  2. Steven Craig Basham

    Jeff Mishler Guest

    You must run (vl-load-com) at least once in a drawing prior to using vla-,
    vlax-, vlr- functions. I've added to my acaddoc.lsp to make sure it's always
    loaded.

    HTH,
    Jeff
     
    Jeff Mishler, Jun 21, 2004
    #2
  3. Just a bit of a clarification: (vl-load-com) only needs to run once per
    _AutoCAD_ session; it does not need to be run with each drawing. However,
    there is certainly no problem in doing so, right Jeff?! ;^)

    --
    R. Robert Bell


    You must run (vl-load-com) at least once in a drawing prior to using vla-,
    vlax-, vlr- functions. I've added to my acaddoc.lsp to make sure it's always
    loaded.

    HTH,
    Jeff
     
    R. Robert Bell, Jun 21, 2004
    #3
  4. Steven Craig Basham

    Jeff Mishler Guest

    Heh,
    Drawing/Session, aren't they the same thing :) Uhm, what he said ^^^^^
     
    Jeff Mishler, Jun 21, 2004
    #4
  5. Steven Craig Basham

    ECCAD Guest

    My 2 cents:

    AutoCAD_Session = call acad.exe
    Drawing Opened = just that.

    You (can) load (vl-load-com) either with 'start' of AutoCAD,
    or (foreach) drawing open..in acaddoc.lsp. Either way.
    If it is already 'loaded', it just returns nil, with virtually no delay.

    Bob
     
    ECCAD, Jun 21, 2004
    #5
  6. Steven Craig Basham

    John Uhden Guest

    Actually, if successful, it always returns a SYM, just like (princ).
    So you can use it in a Kosteresque fashion, sorta like ...
    (and
    (or
    (= (type vl-load-com) 'SUBR)
    (prompt "\nvl-load-com is not a function")
    )
    (= (type (vl-load-com)) 'SYM)
    (print "OK so far")
    )

    That wasn't meant to be an all-encompassing example of bullet-proofing, but just
    a little pointer.
    Hmmm... it's really kinda stupid since if VL.ARX is missing the whole AutoLisp
    thing seems to go kaput. :/
     
    John Uhden, Jun 22, 2004
    #6
  7. <snort>

    --
    R. Robert Bell


    ....
    Hmmm... it's really kinda stupid since if VL.ARX is missing the whole
    AutoLisp
    thing seems to go kaput. :/
     
    R. Robert Bell, Jun 22, 2004
    #7
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.