TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ScottMC on September 26, 2022, 07:52:58 PM
-
Hopes are someone has done this and can just forward me.. can't get the 'check' to show when this OSMODE is set.
ID_OsnapNone [$(if,$(!=,$(and,$(getvar,OSMODE), 0),0),!.)None non]_non
......................................The others [other than this /0\ thing] work fine. How else to call/get? Help..
-
In my Osnap Cursor Menu I use this macro that displays if Osmode is set to None and toggles it On when selected:
Display Name $(if,$(=,0,$(getvar,osmode)),!.)None
Command Name None
Macro ^C^C^P'setvar;osmode;0 ^P
Image RCDATA_16_OSNNON
-
this is where it doesn't work [wheel click]
***POP0
**SNAP
[Object Snap Cursor Menu]
;
;
ID_Cancel [ *Cancel*]^C^C
[--]
ID_OsnapNear [$(if,$(!=,$(and,$(getvar,OSMODE), 512),0),!.)Nearest nea]_nea
ID_OsnapNone [$(if,$(!=,$(and,$(getvar,OSMODE), 0),0),!.)None non]_non
ID_OsnapEndp [$(if,$(!=,$(and,$(getvar,OSMODE), 1),0),!.)Endpoint end]_endp
ID_OsnapMidp [$(if,$(!=,$(and,$(getvar,OSMODE), 2),0),!.)Midpoint mid]_mid
ID_LastPoinp [Lastpoint_@]@;
;
;
-
That's because None means No Osnaps are active meaning OSMODE must equal 0.
All other Osnaps may be toggled on/off without affecting the others but setting None turns off all Osnaps.
Change it to $(if,$(=,0,$(getvar,osmode)),!.)None
-
Magnificent! Works perfect. Thanks Much. This part of understanding is under lisp major. So glad theswamp survived its oops/clean-up over the weekend!