State of a menu item not saved after restarting Rhino and Grasshopper

Hello
In this example of @chanley

When i restart Rhino the script don’t save the last choice
What is the solution for this?

I don’t have a direct solution but perhaps this might point you in the right direction? There is also a link to an approach by @piac that may help.

1 Like

Thank you
The example of @piac don’s save the values after reopening the file, i choose to use inputs with boolean until i find a solution

@seghierkhaled do you need to save the value per-user, per-definition or per-component?

Hi @piac
I don’t know what is the diffence between them.
It’s like bounding box when we choose per object or union and the choice saved.

I’m just asking, for what do you need the drop-down? If it’s in a component, then maybe the classic GH way is best. If it’s for something relating to some settings, then maybe something stored in the definition (GHX file) will be required. If it’s something for each Rhino, then maybe something stored on the deskop would work. It depends…

It’s in the component like the script of @chanley
The same example with possibility to make the component remember the choice.
In that example the choice always reseted to default.
Is that possible with Ghpython?