Partial Load ARX file?

Discussion in 'AutoCAD' started by jfrog, Feb 7, 2005.

  1. jfrog

    jfrog Guest

    Is it possible to do a partial load of an ARX file? I've got McNeel's DOSLIB, but the only function I need is the "dos_beep" function...I don't want everything else sitting in memory all the time for the occasional use of one function.

    Any ideas?

    Thanks.

    JR
     
    jfrog, Feb 7, 2005
    #1
  2. jfrog

    BillZ Guest

    (vl-cmdf "vbastmt" "beep")

    or


    (vlr-beep-reaction)

    Bill
     
    BillZ, Feb 7, 2005
    #2
  3. jfrog

    Matt W Guest

    For what it's worth, here's I handle DosLib...

    (defun LoadDosLib ()
    (if (null dos_about)(arxload (strcat LSPDir "doslib2004")))
    )

    (defun UnloadDosLib ()
    (if (not (null dos_about)) (command "arx" "unload" "doslib2004"))
    )

    (defun C:Test ( / )
    (LoadDosLib) ; Load DosLib
    (dos_beep) ; Perform some action/command
    (UnLoadDosLib) ; Unload DosLib
    (princ)
    )
     
    Matt W, Feb 7, 2005
    #3
  4. jfrog

    jfrog Guest

    Thanks for the response. That's good enough for what I need it for.

    JR
     
    jfrog, Feb 7, 2005
    #4
  5. jfrog

    Anne Brown Guest

    JR -

    In addition to any replies you might receive or have already
    received, you may find more information or responses by posting
    future ObjectARX related questions in the following discussion
    group:

    Newsreader:
    news://discussion.autodesk.com/autodesk.autocad.objectarx.
    Web browser:
    http://discussion.autodesk.com/forum.jspa?forumID=34.
     
    Anne Brown, Feb 7, 2005
    #5
  6. jfrog

    Tom Smith Guest

    I'm surprised you'd take that route, as compared to Bill's earlier
    suggestion of (vlr-beep-reaction), which is a built-in function that doesn't
    require a 3rd party application or any loading or unloading. I use doslib
    for other things, but wouldn't fool with it just for a beep.

    Per the original question, I'm not aware of any harm being done by doslib
    being present in memory. But I have a pretty good idea that Acad doesn't
    surrender all its RAM when it closes a drawing. This is based on the fact
    that that when I run scripts in SDI (using a bare-bones profile with nothing
    being loaded, no doslib, not even a menu) I will inevitable have an out of
    memory error after 200 or 300 drawings, and need to reboot to continue.
    That's with small drawings, generally under 500K.

    From this experience, I wonder if memory is always fully released when an
    arx is unloaded. If anything, I'd be more suspicious of creeping memory loss
    from continually loading and unloading a 300K file utility every time you
    want a beep, versus just loading the beeper once and leaving it alone.
     
    Tom Smith, Feb 10, 2005
    #6
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.