r.grandmaison
2006-05-08, 04:48 PM
This might be better in the Customization Lisp forum, but it's such a small, but important little tip that I thought I'd post it here.
If you don't use ACAD.LSP (or variants) you should! We use it to provide quick toggles between sysvars that have either a 1 or a 0 value. Tilemode, Pickstyle, etc...those kind. You KNOW what the current value is, you just want to quickly jump to the opposite value, and then back again when needed.
So, copy/paste this bit of code into your ACAD.LSP file and tweak it as needed for your own favorite toggling sysvar:
(defun C:PK ()
(if (= (getvar "Pickstyle") 1)
(setvar "Pickstyle" 0) ; if pickstyle is 1 set it to 0
(setvar "Pickstyle" 1) ; otherwise it is 0 so set it to 1
)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]
If you don't use ACAD.LSP (or variants) you should! We use it to provide quick toggles between sysvars that have either a 1 or a 0 value. Tilemode, Pickstyle, etc...those kind. You KNOW what the current value is, you just want to quickly jump to the opposite value, and then back again when needed.
So, copy/paste this bit of code into your ACAD.LSP file and tweak it as needed for your own favorite toggling sysvar:
(defun C:PK ()
(if (= (getvar "Pickstyle") 1)
(setvar "Pickstyle" 0) ; if pickstyle is 1 set it to 0
(setvar "Pickstyle" 1) ; otherwise it is 0 so set it to 1
)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]