Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/07/2025 in Posts

  1. Another way not as compact but a little easier to read/follow. Would also handle if uscfollow wasn't 1 or 0 Tho i don't know when/if that would ever happen. ;; Toggle UCSFOLLOW using COND (defun c:foo (/ v) (setq v (getvar "UCSFOLLOW")) (cond ((= v 1) ;; If it's currently ON turn it OFF (setvar 'UCSFOLLOW 0) (princ "\nUCSFOLLOW Desactivado") ) ((= v 0) ;; If it's currently OFF turn it ON (setvar "UCSFOLLOW" 1) (princ "\nUCSFOLLOW Activado") ) (T ;; If it’s some unexpected value, default to OFF (setvar "UCSFOLLOW" 0) (princ "\nUCSFOLLOW Desactivado") ) ) (princ) )
    1 point
×
×
  • Create New...