Extract File Name From Rhino to Grasshopper

Found This Thread

But can anyone tell me to extract Just the File Name?

Thank You

I think this is what you’re looking for (python):

import Rhino

print Rhino.RhinoDoc.ActiveDoc.Name


1 Like

Thank you @kev.r … I’m new to Python, how exactly does this work?

Just copy the text I posted and paste it into a GhPython Script component.

Instead of printing the value you could assign it to output a if desired.


@kev.r Thank You!