Tell running Rhino application to execute script

Hi @dale,

the links above to github seem to be dead. I’ve found The TestRhino5Automation.vbs example via google and changed:

Set objRhino = CreateObject("Rhino5x64.Application")


Set objRhino = CreateObject("Rhino5x64.Interface")

My Rhino 5 x64 SR12 is open. If i run the vbs script from a command prompt, it opens Rhino 4 instead, writes the file to the desktop and then hangs. I’ve searched my registry for above key but it does not exist. It also opens a new Rhino 4 when it is already open. How can i change it so it uses the open Rhino 5 x64 instance ?

Here is my vbs: (840 Bytes)

I’ve seen your zip files on YouTrack but i am unsure which one to use to fix this without goofing things up :slight_smile:

EDIT: I’ve found the Rhino.Interface and Rhino.Interface.6 entries, but get same problem, it pops up a new rhino.exe in taskmanager which does not remain open and ignores the allready opened Rhino5 or Rhino 6 instance.


Hi Clement,

I ran the script you reference here and it seems to work. Here the the source, by the way.

If you’ve grepped the Registry cannot find either Rhino5x64.Application or Rhino5x64.Interface then you should probably repair your installation, as these keys are added by the Rhino installer.

Note, Rhino.Interface and Rhino.Interface.6 are for Rhino 6.

– Dale

1 Like

Hi @dale, i guess the problem is my registry, the Rhino5x64.Interface is missing:

I can make it work for an open Rhino4 instance by using: Rhino4.Interface, it works for an open Rhino5 x86 instance by using Rhino5.Interface and for Rhino6 x64 by using Rhino.Interface.6

How can i repair my registry or add the missing keys without too much risk loosing my configuration ?


Hi Clement,

Try right-clicking on your Rhino shortcut and then pick “Run as administrator.” Does that help?

– Dale

Hi Dale, unfortunately not.

I’ve now solved it by creating an ironpython script which i can run with ipy.exe using the clsid 4AD5D33E-7576-4C71-BEDC-E174E5DEF0DA instead of Rhino5x64.Interface:

import System
guid = System.Guid('4AD5D33E-7576-4C71-BEDC-E174E5DEF0DA')
xType = System.Type.GetTypeFromCLSID(guid)
obj = System.Activator.CreateInstance(xType)

This works when Rhino5x64 is open. For Rhino4, Rhino5 x86 and Rhino 6 it seems to accept a ProgID:

xType = System.Type.GetTypeFromProgID('Rhino4.Interface')
xType = System.Type.GetTypeFromProgID('Rhino5.Interface')
xType = System.Type.GetTypeFromProgID('Rhino.Interface.6')

…but not Rhino 5x64. Strange.


1 Like