;***************************************************************** ;* FILE: FL.lsp * ;* DESCRIPTION: Isolates a layer by selecting an * ;* entity on the layer to be isolated. * ;* LAST UPDATED: 2-5-93 * ;* USAGE: Sets a layer current and freezes all other * ;* layers. * ;* VARIABLES: EXP Existing setting of variable "EXPERT". * ;* ENT Selected entity's name. * ;* DDE Definition data of selected entity. * ;* NAM Layer name of selected entity. * ;* * ;* * ;* * ;***************************************************************** (defun C:FL (/ EXP ENT DDE NAM) ;Defines function (setq EXP (getvar "EXPERT")) ;Sets value of Expert to EXP (setvar "expert" 1) ;Sets value of expert to 1 to ;supress prompts (setq ENT (car (ENTSEL "Select object on layer to isolate:"))) ;Sets ENT to the entity name of ;the selected object (setq DDE (entget ENT)) ;Sets DDE to the definition data of ;the selected entity (setq NAM (cdr (assoc 8 DDE))) ;Extracts the layer name from the ;definition data (command "LAYER" "S" NAM "FREEZE" "*" "THAW" NAM "") ;Issues the layer command, sets the ;entity layer current, and freezes all ;other layers. (setvar "EXPERT" EXP) ;Returns expert to previous value (PRINC) ;Cleans command line ) ;Closing parenthesis of routine