How to create a shortcut aliases to toggle Grid?

My current Command macro

Grid _ShowGrid=No

If I want it to be a toggle. I need a if statement there somehow right?
or maybe something similar to

Grid _ShowGrid=!_ShowGrid

how to fix the syntax here?

Hello- when making macros, entries must be separated by a space.

_Grid ShowGrid=Yes/No Enter[](


Thanks Pascal,

I think the question is more on the toggle part
like if currently _ShowGrid=Yes, set it to No
if currently _ShowGrid=No, set it to Yes

Basically, I want to replicate the F7 key, which is a hidden command in Rhino Command Window if I click F7 (on the other hand, Gird or SmartTrack are both built in toggle and they show in the Rhino Command Window)

Ah, if you do not specify, it toggles.


1 Like