Acad & AcadDoc defun-q in these is executed in reversed

Discussion in 'AutoCAD' started by jrh1959, May 13, 2004.

  1. jrh1959

    jrh1959 Guest

    Hello,

    I have a function setup in the acad.lsp file:

    (defun-q c:ERMCTool ()
    (setvar "filedia" 0)
    (command "_VBALOAD" "J:\\AutoCadProgramming\\working\\ERMCBatch.dvb")
    (setvar "filedia" 1))

    Do to a post about execution problems I put the command into a script:

    (defun-q launchscript ()
    (command "script" "mb.scr"))

    (setq s::startup (append s::startup launchscript))

    Now, in the AcadDoc.lsp I put:

    (defun-q starttool ()
    (command "-vbarun" "run_all"))

    (setq s::startup (append s::startup starttool))

    For the first drawing when AutoCAD first starts up the functions are executed in reverse order from the order the lisp files are loaded by AutoCAD.

    If I type !s::startup at the command line it returns:

    (nil (ACADMSTARTUP) (COMMAND "script" "mb.scr") nil (COMMAND "-vbarun" "run_all"))

    Which to me says the order as far as AutoCAD is concerned is correct. Now when I call up another drawing the AcadDoc.lsp functions correctly.

    I can't find anything here or in the KB that address this particular issue. I tell people to kill the first blank drawing and start a new one which I could program in. In any case its not a show stopper just and irritation.

    Any Ideas? Thanks,

    John
     
    jrh1959, May 13, 2004
    #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.