...with one difference that I'm aware of, which may only sometimes matter:
(command "_.layer" "_set" "whatever" "")
will turn the new current Layer ON if it's OFF, whereas
(setvar 'clayer "whatever")
will leave it OFF, so you could then start to draw things you wouldn't be able to see.
I agree that it's weird that it behaves differently for the OP on two machines where the only known difference is the operating system. And I'm most surprised that the hyphen makes the difference, because it's not supposed to be relevant when calling dialog-box commands from inside a (command) function. I would hope that the period prefix would work [with or without the underscore], which ought to be preferable to the hyphen.
--
Kent Cooper
thatcadguy wrote...
P.S. You can achieve the same by (setvar "CLAYER" "0")
Kent Cooper, AIA