Hello Tom,
verry good this toogle button.
Youroriginal questionisanswered?
Now i have a question.
Sincev18the imported2delements of theworking planescan be represented in theiroriginalcolors and linetypes.
If this isset to ONyou can not workgoodwith the elements and you have to switch to OFF.
Currently I havetwo buttonsand wanted to makeoneas inyour example but unfortunatelyit does not work.
Because I'm not good inLisp, I now wanted toask herein the forumwhere the erroris.
(in-package :OI_Tools)
(use-package :oli);;define toggle_line_type_and_color
(defun toggle_line_type_and_color ()
;;check to see if the function is available on request (t) if so make it default, else make it true.
(if (eql (set-default-show-setting :workplanes_2dgeo_color t))
(setq (set-default-show-setting :workplanes_2dgeo_color nil)
(set-default-show-setting :workplanes_2dgeo_line_type nil)
(set-show-settings-to-default (oli::sd-inq-current-vp)))
(setq (set-default-show-setting :workplanes_2dgeo_color t)
(set-default-show-setting :workplanes_2dgeo_line_type t)
(set-show-settings-to-default (oli::sd-inq-current-vp)))
))
;; 1.Button for show ON
;;(set-default-show-setting :workplanes_2dgeo_color t)
;;(set-default-show-setting :workplanes_2dgeo_line_type t)
;;(set-show-settings-to-default (oli::sd-inq-current-vp))
;; 2.Button for show OFF
;;(set-default-show-setting :workplanes_2dgeo_color nil)
;;(set-default-show-setting :workplanes_2dgeo_line_type nil)
;;(set-show-settings-to-default (oli::sd-inq-current-vp))