0 Members and 1 Guest are viewing this topic.
(defun c:mode ( ) (princ (strcat "\n" (nth (setvar 'colortheme (abs (1- (getvar 'colortheme)))) '("Dark" "Light")) " mode active." ) ) (princ))
In a recent LinkedIn post Sam Lucida discussed the creation of light and dark profiles to make it easy for him to switch between his working (dark mode) and documenting (light mode) environments. It's a great idea but I also thought it should be easy to toggle via a system variable, and it is:(setvar 'colortheme (abs (1- (getvar 'colortheme))))If you prefer a command simply:Code: [Select](defun c:mode ( ) (princ (strcat "\n" (nth (setvar 'colortheme (abs (1- (getvar 'colortheme)))) '("Dark" "Light")) " mode active." ) ) (princ))Cheers.
I would have called it Mood in lieu of Mode
(boole 6 (getvar 'colortheme) 1)
Very nice MP, I love the way it seem.
(- 1 (getvar 'colortheme))
(defun c:Mood ( ) ;; M.Puckett, 2020 (inspired by Sam Lucido). (princ (strcat "\n" (nth (setvar 'colortheme (~ (- (getvar 'colortheme) 2))) '("Dark" "Light") ) " mode active." ) ) (princ))
Oh, you beat me to the BNOT.
(setq acadobject (vlax-get-acad-object))(setq acadpref (vlax-get-property acadobject 'preferences))(setq acaddisp (vlax-get-property acadpref 'display))(vlax-put-property acaddisp 'GraphicsWinmodelBackgrndColor 65986) ;;Model space background(vlax-put-property acaddisp 'GraphicsWinLayoutBackgrndColor 63434) ;;command area(vlax-put-property acaddisp 'ModelCrosshairColor 865785);; crosshairs(vlax-put-property acaddisp 'TextWinBackgrndColor 3687) ;;command area
$(if,$(=,0,$(getvar,colortheme)),!.)Dark Mode
^P(ai_onoff "colortheme") ^P
Add CUI macro ...
Along those lines ...