Scripting

Customize and extend Rhino to suit your workflows using Python 3 and .NET with a common editor in Grasshopper and Rhino on Windows and Mac.


Refreshed Editor

  • Unified Script Editor with Debugging in Rhino and Grasshopper on Windows and macOS
  • Python 3 (CPython) supporting scientific libraries (e.g. NumPy, openseas) and PyPI packages
  • Modern C# scripting supporting NuGet packages
  • Publishing Scripts as Rhino or Grasshopper plugins

 

    • Walrus operator? Yes!
    • Use popular PyPI packages in Rhino and Grasshopper
    • Step into your script and debug
    • Use PyPI or NuGet packages in your Rhino or Grasshopper scripts
    • Scripts can specify their required packages inline, and are self-contained
    • Unified Script Component for all languages
    • Step into your Grasshopper script and debug
    • Use PyPI or NuGet packages in Grasshopper scripts
    • Package your script commands into Rhino plugins (.rhp | .macrhi) with toolbars (.rui)
    • Package you script components into Grasshopper plugins (.gha)
    • Use third-party packages - or your own libraries - in scripted commands and components
    • Create Package Manager “yak” packages for your plugin

    Rhino 7 Scripting Tools
    Are Still Available

    • Macros
    • RhinoScript
    • IronPython 2.7 in Rhino (Legacy Editor)
    • IronPython 2.7, C#, VB.Net Scripting in Grasshopper (Legacy Editor)
    • Rhino Script Compiler (Legacy Interface)

    Try It

    1. Download Rhino 8 Evaluation for Windows or Mac.

    In Rhino

    1. Type ScriptEditor in the command prompt to open Script Editor. The Editor begins initializing Python 3 runtime (this only happens after a fresh install and can take a few moments to complete).
    2. When ready, click the New button and create a new Python 3 or C# script from Examples.
    3. Click the Run (play) button to execute the script.
    4. Explore other examples to see how you can use third-party packages in your scripts.

    In Grasshopper

    1. Type Grasshopper in the command prompt to open Grasshopper. The Editor begins initializing Python 3 runtime (this only happens after a fresh install and can take a few moments to complete).
    2. When ready, from the Maths panel, add a new Script component to the canvas.
    3. On the script component, click on a language to start a new editor with a default script.
    4. Add a few inputs and outputs to the component. Pass data to the inputs.
    5. Now click the Solve button in Grasshopper.
    6. Open the Examples panel in Editor to explore other Grasshopper script examples.
    7. Use the Templates panel to initialize your new scripts.

    Ask questions and give feedback on the Discourse Forum.

    Rhino Commands