running osnaps...

aaron weissner

Usenet Archive
Joined
Jul 30, 2003
Messages
48
Reaction score
0
how do i get a list of what osnaps are currently turned on, save the list, and restore the snaps at a later time...
 
(setq old_snap_mode (getvar "OSMODE"))
More code here..
(setvar "OSMODE" old_snap_mode); reset

Bob
 
The "OSMODE" variable holds the values in a bit sequence that can be manipulated via LOGAND and LOGIOR. The following is some old code (and yes a bit un-optimized) but it will actually generate a list of osnaps in string format from the supplied osmode variable. Maybe that will help?

Devin

(defun get_osnap_list ( ed_arg / ed_wrk ed_oslist ed_osnap ed_list) (setq ed_osnap ed_arg) (setq ed_list "") (if (>= ed_osnap 16384) (setq ed_list nil) (progn (setq ed_oslist '( (8192 "_par") (4096 "_ext") (2048 "_app") (1024 "_qui") (512 "_nea") (256 "_tan") (128 "_per") (64 "_ins") (32 "_int") (16 "_qua") (8 "_nod") (4 "_cen") (2 "_mid") (1 "_end") ) ) (foreach ed_wrk ed_oslist (if (>= ed_osnap (car ed_wrk)) (progn (if (equal ed_list "") (setq ed_list (cadr ed_wrk)) (setq ed_list (strcat ed_list "," (cadr ed_wrk))) ) (setq ed_osnap (- ed_osnap (car ed_wrk))) ) ) ) ) ) (setq ed_list ed_list)
)
 
Back
Top