Rhino isn't closing with vbs script. open t-spline, smooth as step, close

opensmoothcloseexit.txt (2.8 KB)

simplebox.3dm (23.0 KB)

Do save as a vbs file before running from the command line with
C:> CSCRIPT opensmoothcloseexit.vbs simplebox.tsm. Also make sure that you have the Tspline add-in installed.

I’m trying to exit rhino… and have so far tried…

oRhinoScript.DocumentModified = False
Call objRhino.RunScript("-Exit", 0)


Any help please would be great!

If I comment out the tsSmoothToggle command and replace the mesh box with a Brep box, the script runs as expected - closes that is. I don’t have T-Splines - sorry…

That’s interesting, perhaps it is something to do with T-splines or that I have a T-splines trial license, I don’t know.

Perhaps I can close rhino automatically by some other means?

As the process I have in mind is iterative, it’s much better if rhino closes automatically.

I have not tried this, but here is a brute force method.

Set objShell = CreateObject("WScript.Shell")
Call objShell.Run("taskkill /im Rhino.exe", , True)


I tried this in the end and it worked when running the vbs from c drive or desktop but not from the network drive for some reason.

Dim objshell : Set objShell = CreateObject(“WScript.Shell”)
objShell.Run “Taskkill /IM Rhino.exe /F”, , True

Running VBScripts from network drives is kind of beyond our scope of support. You will need to spend some time in Google to see if you can figure out what’s going on and how to work around it.