How to get Gh doc file name?


i try this code,but the result sometime with “*” means need to save.
how can i get the pure filename?
Thankyou!

Try this:

https://developer.rhino3d.com/api/grasshopper/html/P_Grasshopper_Kernel_GH_Document_FilePath.htm

// Rolf

1 Like

thankyou Rolf,but i just want “IK Inverse Kinematic Segments.gh”…

Path.GetFileName
Path.GetFileNameWithoutExtension

Google knows. :wink:

// Rolf

Thank you Rolf,i go to learn it!

Like this: (System.IO.Path. aso)

// Rolf

1 Like

Thank you very much,Rolf.