Toggle Predefined Layer Un/Freezing - Keyboard Shortcut?
Greetings wise village elders,
I'm looking to have a simple keyboard shortcut (Ideally Ctrl+L) to switch my Defpoints layer between frozen states.
How might I go about this? I'm thinking a lisp or macro must surely be possible if there isn't already a BC way of doing it.
At the moment I just have the layers panel open and click the icon as necessary, but would love a faster process.
Many thanks
Comments
-
This post probably contains what you want, an example where the person uses command "1".
Your header is mentioning "freezing" and the body text "on and off". Please be aware that those are two different things.
1 -
; DF toggles Defpoints on/off, assuming that Defpoints is normally the active layer
(defun c:DF ()
(if (equal (getvar "CLAYER") "Defpoints")
(progn (command "-LAYER" "S" "0" "")
(command "-LAYER" "OF" "Defpoints" "") )
(command "-LAYER" "S" "Defpoints" "") ) )0