Hi @Willem, one way would be to grab the required info from the command line after the file has been opened (or imported). A similar question has been answered here.
Note that Rhino 6 seems to have a different string in the command line than the one shown in the example linked above.
Another way would be to get the title from the process id. Below was tested with Rhino 6, with only one open instance:
from System.Diagnostics import Process
proc = Process.GetCurrentProcess()
title = Process.GetProcessById(proc.Id).MainWindowTitle
text = title.Split()
text = None