Grid and Osnap Toggle Macro

Hey everyone,

I use snaps, both Grid and Osnap, very often and I need to switch between them. Although, I know that Grid Snap is overridden by Osnap, I’d like to set a macro for toggling between those two.

I managed to do it by following command: !_DisableOsnap _Toggle _Snap
Works perfect, but I have an issue. If I have selected a command, let’s say to draw a polyline, using that macro disables current command, unlike using F9 for Snap. How can I solve this small problem?

Thanks!

Just take out the “!” at the beginning of the macro. That is equivalent to pressing the escape key, it cancels any running command. The Macro should then be able to run “transparently”.

–Mitch

Hey Mitch!

Thank you, it works perfectly!
What’s the difference between '_Snap and just _Snap?

The ’ is supposed to allow the command to work nested inside another command, so your macro could also be

'_DisableOsnap _Toggle _Snap

but it appears to not need this to work.

All the macro stuff can be found in the Rhino help (F1) , search for Command macros and scripting…

–Mitch