View Full Version : Layer On/Off Shortcut
7th May 2003, 09:46 pm
I would like to know if it is possible to have either a shortcut key or a menu button that could toggle on or off a specific layer (the viewport layer). Thanks in advance.
7th May 2003, 10:35 pm
Either of these things are possible but you would need to use an underlying LISP routine to actually do the work.
7th May 2003, 11:28 pm
I guess that is my problem, where could I get a LISP routine that could do this? Has anybody seen one that is similar?
7th May 2003, 11:46 pm
try this, use the TL=thaw layer FL=freeze layer
;; Name:- Layer Utilities lisps
;; Written by:- Greg Smith
;; Written on:- 16/5/2001
;; Modified by:- Greg Smith
;; Modified on:- 18/7/2001
;; Freezes the select layer
(defun c:fl ( )
(setq flay (cdr (assoc 8 (entget (car (entsel "\nSelect the object on the layer you want to freeze: "))))))
(setq clayer(getvar "clayer"))
(if(= clayer flay)(alert "\nCAN'T FREEZE THE CURRENT LAYER! "))
(command "layer" "f" flay "")
(prompt (strcat " The " lay " layer has been frozen "))
) ;; Defun
;; Thaws all frozen layers
(defun c:ta ( )
(command "layer" "t" "*" "")
(prompt "\nAll layers are thawed ")
) ;; Defun
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.