;;SAVARS.LSP - (c) 1988-97 Tee Square Graphics ;; ;; The (savars...) and (revars) functions are used by many ;; of the AutoLISP programs authored and distributed by ;; Tee Square Graphics. ;; ;; (savars...) creates a global list from the list contained ;; in the calling program consisting of the listed System ;; Variables and their current values. ;; ;; (revars) restores the System Variables that may have been ;; modified by the calling program to the values saved by ;; the (savars...) function ;; (defun savars (sv0 / x) (setq svx1 nil olderr *error*) (foreach x sv0 (setq svx1 (append svx1 (list (list x (getvar x)))))) (defun *error* (msg) (revars)) ) (defun revars (/ x) (setq *error* olderr) (foreach x svx1 (setvar (car x)(cadr x))) (setq svx1 nil) (princ) )