If you want to change an icon with lisp you can do something like the following. I use this to change button #18 on toolbar "enco draw" to show the current drawing scale.thanks for the reply, very interesting. I think that's what I wanted, now do a look.
...
If you change the .cuix file , that doesn't mean you also change the .mnr file(s). So I think this is not possible without recompiling the .cuix.
If you change the .cuix file , that doesn't mean you also change the .mnr file(s). So I think this is not possible without recompiling the .cuix.If I copy my cuix to a new computer, the icons on custom toolbars, even though they're all native commands/icons, I have to reset the icons (add/delete something) before it will display the icons again. Is this a result of only copying the cuix file when I should be copying the mnr file as well?
in the "Set Scale" code listed above, is there a way to use this code for SNAP ON or OFF by showing a green colored swatch on the ribbon panel if SNAP is ON and a red colored swatch if Snap is OFF? If so, can someone show me what that would look like in code?
Thanks,
John
;; defun a lisp call back function
(defun monitorSysVar (rObject vName / *error*) ; vName is the list returned by the reactor
; First parameter is a string identifying the system variable name.
; Second parameter is symbol indicating whether or not the change
; was successful (T if successful, nil if not).
(defun *error* (msg)
(princ (strcat "\nError: " msg))
)
(if (= (car vName) "SNAP")
(set_buttons)
)
)
(defun c:activateSysVarMonitor ()
(setq rObj (vlr-sysvar-reactor
nil
'((:vlr-sysvarchanged . monitorSysVar))
)
)
)
(defun c:deActivateSysVarMonitor ()
(vlr-remove rObj)
)
;;; activate monitor by default
(c:activateSysVarMonitor)
(set_buttons)