From: Vladimir Nesterovsky Newsgroups: autodesk.autocad.customization Subject: Re: isolate.lsp Date: Mon, 03 Nov 1997 00:13:10 +0200 Glen -- if you're working with R14, it has layer status save/restore routines in Bonus menu. You can save the layer status before, then run an isolate routine and later restore the save status. If you want to do that on other versions of ACAD, then you'll need some lisp routine. We can do some little thing here. Let's say that it'll be sufficient just to have GOBACK command that will thaw all layers that were frozen by ISOLATE. ;; Copyright 1997 Vladimir Nesterovsky, vnestr@netvision.net.il ;; This is for your own *non-commercial* use *only*. (defun c:isolate ( / e laynam lay ) (setq *to-thaw* nil) ;; a global variable (setvar "cmdecho" 0) (Setq e (car(entsel "\nPick an entity: ")) laynam (cdr(assoc 8 (entget e)))) (while (setq lay (tblnext "layer" (not lay))) (if (/= 1 (logand (cdr(assoc 70 lay)) 1)) (setq *to-thaw* (cons (cdr(assoc 2 lay)) *to-thaw*)))) (command "._layer" "_set" laynam "_fr" "*" "") (princ "\nType GOBACK to restore previous status!") (princ)) (defun c:GOBACK() (setvar "cmdecho" 0) (command "._layer") (foreach laynam *to-thaw* (command "_t" laynam)) (command "")) HTH Glen R wrote: > > I have seen several isolate lisp routines that will freeze all layers > except the one of the entity selected. These routines are usually > useless to me unless they can be followed up with a "unisolate" that > would restore layers to their original status. Kind of like the layer > freeze, layer thaw routines.> > Any ideas would be appreciated, > Glen-R -- Live long and prosper :) Vlad http://www.netvision.net.il/php/vnestr/ (defun for-ss ( ss f / n ) (if (= 'PICKSET (type ss)) (repeat (progn (setq n -1) (fix (sslength ss))) (f (ssname ss (setq n (1+ n)))))))