Here are a couple of lisp routines that I found on the net, they can help you out.
;;;******************************************************************
;;; lay01 Freeze all (comand line)
;;; Isolates a single layer chosen from the command line
(defun c:fall (/ layname)
(setq layname (getstring "
Please enter the name of the layer: "))
(command "_LAYER" "s" layname "") ;sets chosen layer to current layer
(command "_LAYER" "f" "*" "");freezes all layers except the current layer
(princ) ;exits quietly
)
;;;******************************************************************
;;; lay02 Freeze all (screen)
;;; Isolates a single layer by choosing an object on that layer from the screen
;;; and freezing all layers except the one chosen from the screen
(defun c:fall (/ layname)
(setq layname
(assoc 8(entget(car(entsel "
Please choose an object to isolate: ")))))
;;; selects an object with entsel, uses car to extract the object's name
;;; gets an entity list with entget, uses assoc to extract the layer name
(command "_LAYER" "s" layname "") ;sets chosen layer to current layer
(command "_LAYER" "f" "*" "") ;freezes all layers except the current layer
(princ) ;exits quietly
)
;;;******************************************************************
;;; lay03 Thaw all
;;; Thaws all layers
(defun c: tall ( )
(command "_LAYER" "t" "*" "") ;thaws all layers
(princ) ;exits quietly
)
;;;******************************************************************
These can be converted to strictly script routines, rather than lisp, example code here sets layer 0 as current, then freezes everything (*) else.
;Begin script
-LAYER
S
0
F
*
;End Script
Then you can select ALL, and do whatever you need to do.
Hope this helps!
Bill