GH_Python: ReadFileVersion()

Hi,

I am quite new to python.
If i am trying to use python to find the version for rhino, how i code it in gh_python. Also, how do i extract the email associated with the Rhino license in python too?

Hi @jia.yeap,

It should be:

import Rhino
print Rhino.RhinoDoc.ActiveDoc.ReadFileVersion()

but for some reason it returns “-1” on my Rhino 6. While on Rhino 5, it works with no issues (returns “5”).
About the email, I am not sure.

True, that is the same error i am getting at. Any idea how to use this?

You can get information such as this in the Rhino.RhinoApp namespace, for instance:

import Rhino as rc
print rc.RhinoApp.Version
print rc.RhinoApp.LicenseUserName
print rc.RhinoApp.LicenseUserOrganization  

Not sure if you can get the e-mail address though.