@Karol-Or wrote:
.... i copied the UCSICON on origin in the list of commands in the panels in CUI and somehow changed it to:
$M=$(if,$(and,$(getvar,ucsicon),2),^C^C_ucsicon _no,^C^C_ucsicon _or)
Why is the first part (^C^C_ucsicon _no)? can't i jump directly to what i want: ^C^C_ucsicon _or
Why does it toggle?
....
I'm not at a newer-version location to confirm, and I'm not all that conversant with Diesel syntax, but just looking at it....
Note the if near the beginning. It looks like [but I'm confused by the and in there] it's checking whether the UCSICON System Variable is set to 2, which is the show-it-at-the-Origin-if-possible setting. The first part following [^C^C_ucsicon _no] would be the 'then' expression -- if it's currently in Origin mode, set it to No-origin mode. The second part [^C^C_ucsicon _or] would be the 'else' expression -- if it's not in Origin mode, set it to be. That's the toggling -- set it to whichever of those two it's not currently set to.
If you always want the button to only set it to Origin mode, whether or not that's the current setting, you should be able to eliminate the whole (if) aspect, and just do the part you want:
^C^C_ucsicon _or
Kent Cooper, AIA