Automating Rhino

Hello, I’ve recently been looking at automating Rhino operations in order to assist in automated testing of our Rhino plugin.

I was wondering if there is a recommended way to inspect the internal state of Rhino? Ideally I’d like to do things like “Get list of loaded plugins”, “send command”, etc.

I see that there is a large resource of application APIs in RhinoCommon Python docs (this is available via IronPython, right?)

Are there any samples about exposing some external interface (command interface, simple REST API, etc) to at least call the RhinoCommon API from outside the Rhino context? If not, do I get at least full access to the host filesystem from within Rhino’s Python (so I could json.dump() some results of tests for example).

Thanks! I’m new to Rhino but the amount of flexibility looks incredible so far.

Hi @nv_matt,

With Rhino 6 and early, you options are limited to access Rhino via ActiveX automation (e.g. COM) using the Rhino and RhinoScript objects. The RhinoScript help file contains some information on external access, and the developer samples repo in GitHub has a sample or two that can help you get started.

With Rhino 7, you can now run Rhino inside of other application. For example, you might write a console application that instantiates Rhino and does “something”, such as “Get list of loaded plugins”, “send command”, etc.

Hope this helps.

– Dale

Hi @dale,

This helps, I had found that automation example but was unsure if it was the canonical example on what is available. Rhino 7 will be fun when I can focus on that :slight_smile:

Thanks for the confirmation.