Below is a tip from a fellow "Block head" Barry Ralphs on accessing the OSNAPHATCH system variable while inside a command.
Ever want to toggle the "Snap to Hatch" (OSNAPHATCH) variable in the middle of a command, so you don't have to exit it and go to your Options, Drafting tab....
$(if,$(and,$(getvar,osnaphatch),1),!.)Snap to Hatch
(if (= 1 (getvar "OSNAPHATCH")) (setvar "OSNAPHATCH" 0) (setvar "OSNAPHATCH" 1))