Query internal values

Is there a Boolean value internally which shows that the current Grasshopper file is opened?
I need this to restore values… which are stored previously.
I need to access this within Grasshopper.

Grasshopper.Instances.ActiveCanvas.Document will get you the currently loaded document (could be null).

well, I dont know how to program with high level language in grasshopper. Is this Boolean available through a widget in the canvas?

Ah, no.

is that mean I should ask someone to write a widget script for me, in C or in something else?

I can try and write a small C# component. But it’ll be difficult to make it respond to changes in the document active state all the time. It’ll need some experimenting.

Of course if a document isn’t loaded then solutions don’t run, so there’s no point in having an output be either true or false depending on whether the document is loaded, because that output will only ever be set when the document is loaded.

I think I need to know more about the problem.

I store the HUMAN UI parameters like slider values, checkboxes statutes, etc… . So when I open the grasshopper file I need this boolean so that I can restore the values on the interface window.