;; | ---------------------------------------------------------------------------- ;; | LA_LayerToggle ;; | ---------------------------------------------------------------------------- ;; | Function : Toggle the state of the specified layer from On to Off and back. ;; | Argument : Layer Name ;; | Action : ;; | Updated : March 24, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun LA_LayerToggle(la / flag tbl) (if (setq tbl (tblsearch "LAYER" la)) (progn (setq flag (LI_item 62 tbl)) (setvar "EXPERT" 4) (if (minusp flag) (progn (princ (strcat "\nLayer : " la " turned on.")) (command "._Layer" "_Thaw" la "_On" la "") ) (progn (princ (strcat "\nLayer : " la " turned off.")) (command "._Layer" "_Off" la "") )) (setvar "EXPERT" 0) ) (princ (strcat "\nLayer : " la " does not exist.")) ) )