Hi,
I am trying to make a batch file that is starting rhino through the command line with the \RunScript option which will adjust it’s toolbar (opening a custom one and displaying it) then close so that it will be there when they open rhino at a later time. When I try to do this though it is not exiting out of rhino if the script involves the toolbar command. A quick example of it not opening is as simple as rhino /runscript="-_Toolbar Enter -Exit" which should start the tool bar command, exit the tool bar command and then exit Rhino.
Instead of creating a batch file you can also create a button in rhino that does the same:
It opens rhino files Renders it and saves the render Closes 3dm file and opens the next.
That would work if we were trying to render with it. What I am trying to do is to create a batch file that will copy over a toolbar (.rui) file from our file server then open rhino open the toolbar display the toolbar then close. That way whenever we need to set up a new machine all we have to do is run the file and it should be set up.
The actual command I am running is
“C:\Program Files\Rhinoceros 5 (64-bit)\System\Rhino.exe” /nosplash /runscript=“-_Toolbar C O “Path\to\our\file.rui” _Enter T tools S tools Y _Enter _Enter -Exit”
I’m not sure why the Exit command is so finicky some times. Something to do with the state of Rhino, message queue, etc.
Anyway, attached is a VBScript that you can run outside of Rhino that should do what you want. Just rename the file’s extension to .VBS and following the instructions in the (text) file. You can have a batch file call this if needed.
The script is (probably) more complicated than it needs. If first tries to launch Rhino 5 64-bit. If it fails, it tries to launch Rhino 5 32- bit.
Once Rhino is running, it just runs some commands before exiting.