toggle on or off ucsicon

Discussion in 'AutoCAD' started by Ghyslain Baril, Jul 24, 2003.

  1. Hi,

    I want to create a button toggle on or of at the same button the ucsicon.

    I have start my button whit this but I have some problem to understand the
    vb language.

    ^C^Cucsicon;$m=$(if,$and,$(getvar,ucsicon),on);off;$goto$end$(else;on);

    Help me please... thanks a lot
     
    Ghyslain Baril, Jul 24, 2003
    #1
  2. Ghyslain Baril

    Jason Wilder Guest

    (if (= (getvar "ucsicon") 0) (setvar "ucsicon" 1) (setvar "ucsicon" 0))
     
    Jason Wilder, Jul 24, 2003
    #2
  3. Ghyslain Baril

    Jeff Mishler Guest

    how about something like this, using lisp:

    ^C^C^P(IF (= (LOGAND 1 (GETVAR "ucsicon")) 1) +
    (COMMAND "ucsicon" "off") (COMMAND "ucsicon" "on"))

    HTH,
    Jeff
     
    Jeff Mishler, Jul 24, 2003
    #3
  4. Ghyslain Baril

    Paul Turvill Guest

    ^C^C(setvar "ucsicon" (- 1 (getvar "ucsicon")))
    ___
     
    Paul Turvill, Jul 25, 2003
    #4
  5. Ghyslain Baril

    Paul Turvill Guest

    .... or better, since the the "2" bit might also be set:
    ^C^C(setvar "ucsicion" (boole 6 1 (getvar "ucsicon")))
    ___
     
    Paul Turvill, Jul 25, 2003
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.