I use a script called “SolidWeight” (attached below) to calculate the mass of objects in Rhino 7. After every update (I just upgraded from from Rhino 7 SR37 to SR38) the script stops working and returns the following error: SolidWeight.rvb (3.5 KB)
---------------------------
Rhino 7 RhinoScript
---------------------------
Source: Microsoft VBScript runtime error
Error: Type mismatch: 'SolidWeight'
Line: 1
Char: 0
Code:
---------------------------
OK
---------------------------
I’m forced to install the script again by dragging it into Rhino 7. While this is fixable, it would be nice if such errors don’t appear after a regular update.
Is there any way to prevent that error from appearing in the future?
Any chance the leading apostrophe on Line 1 is missing? Or some other accidental change near the beginning of the file?
If not I’d check the Rhinoscript version in the old R7 and compare it to the new R7. Possibly the latest version has stricter syntax enforcement than the old one.
Sorry it’s just guesswork, but maybe it will jumpstart some new diagnostic thoughts at your end.
Edit: I just re-read 2nd last paragraph. Do you mean that the old installed script causes the error after a Rhino update but re-installing it causes it to run OK with no error?
This particular script always stops working after I update my Rhino 7. Literally every time since years. This is why I’m forced to open its directory and drag it into Rhino’s viewport, then it works again just as expected. This is the only fix which I found so far.