Full path of grasshopper file

is there a way to display the full path of the gh file I am working on at the top bar?

Hi Gijs
I am not sure if Grasshopper provides the parameters for setting the Full path of grasshopper file.
But it can be done by code.like this.

FullGrasshopperFile.gh (5.9 KB)

1 Like

thanks, what I noticed though is that I need to recompute the solution to make it work. But that’s easily added.

System.Windows.Forms.Form form = Grasshopper.Instances.DocumentEditor;
var docServer = Grasshopper.Instances.DocumentServer;
string path = docServer[0].FilePath;
if(path == null)
{
  form.Text = "Grasshopper - " + "Unnamed";
}
else
{
  form.Text = "Grasshopper - " + path;
}
this.Component.ExpireSolution(true);
A = form.Text;

like this?

FullGrasshopperFile1.gh (1.8 KB)

2 Likes

perfect!
I was doing it with a boolean toggle, but this is much more elegant :slight_smile: