Extract information from Aufit 3dm/ About from Rhino to Python Grasshopper

Good Day,

I am trying to obtain information below through from Rhino to python in Grasshopper. Anyone can shed me some light in terms of programming.

  1. Rhino Version
  2. Rhino File Size

For number 2;

import os
filePath3dm = Rhino.RhinoDoc.ActiveDoc.Path
print os.path.getsize(filePath3dm)

How does these both relate?

Hi @jia.yeap,

I didn’t understand you.
The version method is not working for some reason, at least in Rhino 6.
The file path is working but returns the size in bytes:

import Rhino
import os

print Rhino.RhinoDoc.ActiveDoc.ReadFileVersion()

filePath3dm = Rhino.RhinoDoc.ActiveDoc.Path
print os.path.getsize(filePath3dm) / (1024**2)  # in MB