Hey there !
I’m trying to save the current GH file in a specific location from button without opening a dialog box.
A specific filepath would be given, a specific file name (different from the current one).
I’ve somehow managed to find the way to save the file where it stands
But I’m getting confused between GH_Document vs GH_DocumentIO …
On the “auto_save3” condition, it returns “file_name is not of a recognized type”… But it asks for GH_DocumentIO. Very confused I am.
(no need to say I’m quite new into python and new into python for Grasshopper)
Any help would be really appreciated !
Any good lecture on python for GH also !
import Grasshopper active_gh = Grasshopper.Instances.ActiveCanvas.Document IOactive = Grasshopper.Kernel.GH_DocumentIO(active_gh) if auto_save2: #Save the file where it currently stands. Grasshopper.Kernel.GH_DocumentIO.Save(IOactive) if auto_save3: #Should save the current file to another location Grasshopper.Kernel.GH_DocumentIO.SaveQuiet(IOactive,my_path)