Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error: Visual LISP command document mismatch:

83 views
Skip to first unread message

Blair MacKenzie

unread,
Feb 24, 2003, 6:30:22 PM2/24/03
to
Have posted this before and had no responses so hope someone can help.

This routine works when ACAD starts and then it stops during a session and I
get:-

'mbswap ; error: Visual LISP command document mismatch: MBSWAP

Code currently as follows:-

;apploaded application
(defun c:mbswap(/)
(SETVAR "CMDECHO" 0)
(vlax-add-cmd "mbswap" 'c:mbswap "mbswap" 1);--new command
(setvar "mbuttonpan" (abs (1- (getvar "mbuttonpan"))));--toggle value
(SETVAR "CMDECHO" 1)
)
;menu file
***ACCELERATORS
["F6"]'mbswap

Can anyone see a problem here?


--
Blair MacKenzie
cadesign ltd
vizualisations

+64 21 655325

bl...@cadesignz.co.nz


John Uhden

unread,
Feb 24, 2003, 7:21:16 PM2/24/03
to
1. I don't think it's kosher to vlax-add-cmd a function within the function
itself. How about adding the command *after* the function is defined?

2. There is an anomaly in MDI (or SDI=0) that Steph(and) Koster discovered and
provided a solution:
*Before* you vlax-add-cmd anything of value, add the following:
(defun DummyCommand () nil)
(vlax-add-cmd "DummyCommand" 'DummyCommand)

--
John Uhden, Cadlantic/formerly CADvantage
http://www.cadlantic.com
Sea Girt, NJ

"Blair MacKenzie" <bl...@cadesignz.co.nz> wrote in message
news:9AFB75570E7417EB...@in.WebX.maYIadrTaRb...

0 new messages