Hello all,
To start off here is the original code
Code:
{code}
(defun C:ALERTME ()
(vl-load-com)
(setq VTFRXN (vlr-editor-reactor nil '((:VLR-sysVarChanged . VTF))))
)
(defun VTF (CALL CALLBACK)
(if (and
(= (strcase (car CALLBACK)) (setq str "SAVETIME"))
(not (eq (getvar str) 40))
)
(progn
(princ (strcat "Warning: Someone or something has changed your Autosave settings.\n" str " has been changed back to 40 minutes"))
(setvar "SAVETIME" 40)
)
)
)
(setvar "SAVETIME" 40)
(c:alertme)
{code}
I found this routine a very long time ago to counter CAD's desire to sometimes turn off automatic save (and you never knew until it was too late). It works great, just as advertised it will always turn the savetime back to whatever value you have it set to.
Well, another variable that likes to change on me is the pickfirst variable. It just likes to set itself to 0 from time to time, and it's annoying. So I was like "Well, theoretically I should be able to duplicate it..." and I went on my way. Turns out I was right, it wasn't hard at all...however getting it to place nicely with the savetime variable is an entirely other matter. I basically tried to update all the variables to be a similar format, but different definitions and couldn't get them to cooperate.
Anyone know how to go about doing that?
Thanks