Best Method to Export/Import Human UI Values from File?

What I hope to do is save different states from Human UI/GH to an external file (txt/csv etc) to be retrieved later. Even though internal save states work but I need a way to archive all my permutations and possibly get values to import from other people using a different interface. What is the best way to go about it?

Right now I am experimenting with a Set Value trigger to overwrite values. But with all the diverse types of inputs, Set Value is not always possible.

When I used HumanUI I would save the current state of all my parameters into a JSON file as name/value pairs.

I could then open that file and place the value into a panel hooked up to the ‘default value’ input on the HumanUI parameter.

By giving these panels nick names related to the parameter if was just a matter of using the Human ‘select via nick name’ and ‘set panel contents’ functions to create the ability to update the parameter.

Cheers

DK

That sounds exactly what I need. Do you have links/screenshots/idea on how to go about creating that kind of workflow?

Hi mate, I’m out of the office now until Wednesday, let me see if I can make you up an example when I get back.

Cheers

DK

1 Like

@Muhammad_Talha_Mufte

As promised please find attached a very simple example of saving and reloading HumanUI state to/from a JSON text file.

I’ve left out any logic to save the JSON to disk etc - just shows the packing and unpacking logic using Jswan and Human components.

PLEASE NOTE - the key to getting it to work is the Nick Name convention on the Default Value inputs to the HumanUI elements - I use DF_and the name of the Element so I can connect the JSON keys with the correct element by simply adding the DF_ after I unpack the JSON file.

Let me know if you need any more guidance.

Cheers

DK
231208_Save and reload of HumanUI state example.gh (25.3 KB)

2 Likes