Document mismatch problems with SDI=0 mode

Discussion in 'AutoCAD' started by Steve Adams, Jan 25, 2005.

  1. Steve Adams

    Steve Adams Guest

    Hi Everybody,

    I am new to SDI=0 mode. I never had to use it before, but now I have to
    because I am starting to use Sheet Set manager.

    Now I am having a problem with a couple of the programs which I have
    loaded in my Startup Suite.
    (programs that always work in SDI=1 mode).

    When I try to use one of these lisp routines that use the "vlax-add-cmd"
    function, after I've opened the first dwg (it works), then opened the second
    dwg (it works), then gone back to the first dwg, I get this when I run it:


    ****************************************************************************
    ******
    Command: 'zq
    ; error: Visual LISP command document mismatch: ZQ
    ****************************************************************************
    ******

    I have tried both settings of the "load acad.lsp with every drawing"
    checkbox in Options, but it has no effect on this problem.

    Here is the code for the 2 I'm having problems with:

    note: this code preforms a neat transparent zoom window command
    ----------------------------------------------------------------------------
    -------------------
    (vl-load-com)
    ;; Zoom Quick Window (Command "ZQ")
    (defun agc-zq (/ ll ur pt)
    (setq osm(getvar "osmode"))
    (setvar "osmode" 0)
    (setq ll (vlax-3d-point (setq pt (cadr (grread nil 1)))))
    (setq ur (vlax-3d-point (getcorner pt "\nPick Second Corner:")))
    ;;;;;;;;;; ; (vla-zoomWindow *agc-acadobj* ll ur)
    (setvar "osmode" osm)
    (vla-ZoomWindow (vlax-get-acad-object) ll ur)
    (princ)
    )
    ;(agc-zq)
    (vlax-add-cmd "ZQ" 'agc-zq "ZQ" 1)
    ----------------------------------------------------------------------------
    -------------------

    note: this program toggles running osnaps
    ----------------------------------------------------------------------------
    -------------------
    (vl-load-com)
    (defun TGL (/ A)
    (SETQ A(GETVAR "OSMODE"))
    (IF (/= A 0)
    (SETVAR "OSMODE" 0)
    (SETVAR "OSMODE" 41) )
    (princ)
    )
    (vlax-add-cmd "TGL" 'TGL "TGL" 1 )
    ----------------------------------------------------------------------------
    -------------------

    (I think it was Phil Kennewell (spelling?) who kindly gave me the code 5
    years ago).


    Document mismatch problems are over my head. Any suggestions are greatly
    appreciated.
     
    Steve Adams, Jan 25, 2005
    #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.