Hello all,
We are working with a software for AutoCAD that always mess our osnap.
So I found this piece of code that I use for a while, and I can't remember where I found it.
How ever I think the syntax is not good because It force the osmode all the time and not only when we exit a lisp or a command.
(defun resetosmode (v1 v2 /)
(if (/= (getvar "osmode") 255)
(setvar "osmode" 255)
)
(princ)
)
(vlr-editor-reactor
nil
'((:vlr-lispEnded . ResetOsmode)
(:vlr-lispCancelled . ResetOsmode)
(:vlr-commandEnded . ResetOsmode)
(:vlr-commandCancelled . ResetOsmode)
(:vlr-commandFailed . ResetOsmode)
)
)
I don't really care because I can deal with osmode : 255 at all time but I have a user who doesn't work like me and he would like the osmode to be forced only when exiting a lisp or a command (Cancel included) and let the lisp routine work with the osmode until he leave the command.
Thank you,