Hello,
I would like to load and save a configuration from and to a file in Grasshopper using python, which works, apart from the right save function trigger.
Once loaded, the configuration is saved in a dict in the sc.sticky. The config file should automatically (without for example pressing a button) reflect changes made to the configuration, but I don’t know how to properly trigger the save function.
Right now, I am using a Timer-component to periodically trigger a save config python component.
I checked if there is an event that I could use for this (https://developer.rhino3d.com/wip/api/grasshopper/html/N_Grasshopper_Kernel.htm), but I didn’t find a suitable one. Additionally, it doesn’t seem like one can even use these events from Python, only from VB and C#. Is it possible in GH to call python from a VB or C# script?
Another solution would be calling some python component from another python component. I did not find anything on this here either.
Of course, I could trigger the update directly by connecting all of the components, but I’d rather not do this.
Thanks
5 posts - 2 participants