a place to shine a light on the work of students and teachers
Use _MacroEditor command to load Macro Editor panel. [Tools>Commands>Macro Editor…] Type following codes in Macro Editor. (You can also copy and paste them!)
_SetDisplayMode M _Pause
Run the macro by clicking on play icon on top of the Macro Editor panel. Note that when you run this macro, the macro asks you to choose a display mode and an object that camera will turn around it. To know more about macros in rhino, read this article on McNeel Wiki.
If everything working well, now we can consider a button for this macro. Right-click on any blank area of toolbars to appear the context menu and select New Button..., Button Editor window will be appear. You can assign commands to Left mouse button and/or Right mouse button. In this case copy the codes from previous part of tutorial and paste them in Left mouse button Command field. type word “Demo” in Left mouse button Tooltip field as button name. You can also edit the icon from top right corner of Button Editor window.
You can consider a shortcut key [Tools>Options…>Keyboard] or an alias [Tools>Options…>Aliases] to the macros. When you define an alias for macro, every time you type the alias in command line, macro will be run. Read this article for more information.
Thanks for reading! :-)