Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rhino:basicmacros [2021/05/06]
mitch_heynick [Getting started]
rhino:basicmacros [2025/03/20] (current)
dan [The tools you need]
Line 5: Line 5:
 You can create **macros** in Rhino to automate many tasks, customize your commands, and improve your workflow. You can create **macros** in Rhino to automate many tasks, customize your commands, and improve your workflow.
  
-There may be some confusion about the use of the term “scripting”.  It has been used to describe both the process of writing macros - what this section is about - as well as writing more sophisticated scripts in either [[developer:rhinoscript|RhinoScript]], [[https://developer.rhino3d.com/guides/rhinopython/|Python]], or other programming languages.  +There may be some confusion about the use of the term “scripting”.  It has been used to describe both the process of writing macros - what this section is about - as well as writing more sophisticated scripts in either [[https://developer.rhino3d.com/guides/rhinoscript/|RhinoScript]], [[https://developer.rhino3d.com/guides/rhinopython/|Python]], or other programming languages.  
  
 //The two things are actually very different.// Writing functions in RhinoScript, Python or other programming languages is a lot more complex than creating macros, and requires some programming knowledge and skills.  //We don't cover that here.// //The two things are actually very different.// Writing functions in RhinoScript, Python or other programming languages is a lot more complex than creating macros, and requires some programming knowledge and skills.  //We don't cover that here.//
Line 16: Line 16:
   * The **Rhino Help file** -  lists all Rhino commands and their sub-options. This is your most important reference.  Pressing F1 (Windows) or the :?: toolbar button (Mac) will get you to the online help.   * The **Rhino Help file** -  lists all Rhino commands and their sub-options. This is your most important reference.  Pressing F1 (Windows) or the :?: toolbar button (Mac) will get you to the online help.
   * The Rhino **MacroEditor**, a built-in interface for creating and testing your macros.   * The Rhino **MacroEditor**, a built-in interface for creating and testing your macros.
-  * An understanding of how to add your macros to your workflow in the form of aliases or toolbar buttons (explained [[developer:macroscriptsetup|here]])+  * An understanding of how to add your macros to your workflow in the form of aliases or toolbar buttons (explained [[https://developer.rhino3d.com/guides/general/creating-command-macros/|here]])
 =====You've already used a macro or two...===== =====You've already used a macro or two...=====
 First, if you are a user of Rhino, you are already a macro user even though you may not know it.  Many of the commands in Rhino are already “macroed” for you. When you click a toolbar button or call a command from the menu, it is often a preset macro.  For example, the toolbar button **Extrude Closed Planar Curve** from the "Solid" toolbar has the following macro: First, if you are a user of Rhino, you are already a macro user even though you may not know it.  Many of the commands in Rhino are already “macroed” for you. When you click a toolbar button or call a command from the menu, it is often a preset macro.  For example, the toolbar button **Extrude Closed Planar Curve** from the "Solid" toolbar has the following macro:
Line 68: Line 68:
 For example the macro below For example the macro below
  
-  ! _Polyline Pause_SelLast+  ! _Polyline _Pause _SelLast
  
 will work fine to make the polyline, but it will not be selected at the end.  Why?  Because the single Pause is 'eaten' by the first pick in the polyline, and thus the SelLast command gets executed just after the first pick while we're still making the polyline - and therefore does nothing.  The single pause //does// allow you to finish the polyline with as many points as you want, but there is no longer a SelLast to be run at the end of it - because it ran already and failed.   will work fine to make the polyline, but it will not be selected at the end.  Why?  Because the single Pause is 'eaten' by the first pick in the polyline, and thus the SelLast command gets executed just after the first pick while we're still making the polyline - and therefore does nothing.  The single pause //does// allow you to finish the polyline with as many points as you want, but there is no longer a SelLast to be run at the end of it - because it ran already and failed.  
Line 74: Line 74:
 However, the following macro However, the following macro
  
-  ! _Polyline Multipause_SelLast+  ! _Polyline _Multipause _SelLast
      
 works including selecting the polyline at the end because the Multipause includes //all// the picks for the polyline, allowing the SelLast to be executed and work at the end. works including selecting the polyline at the end because the Multipause includes //all// the picks for the polyline, allowing the SelLast to be executed and work at the end.
rhino/basicmacros.1620331940.txt.gz · Last modified: 2021/05/06 by mitch_heynick