Constant values not in h5 file


I am running multiple simulations with different constant input variables, for example the value of a force or a certain bone elongation or a joint node offset.

For example if have multiple AnyFloat that I change between simulations :

Main.InputVariables = {
AnyFloat gh_offset = {0.01, 0.5, 0.2};

I would like all these input variables (that were created on a folder Main.InputVariables) to also be saved on an .h5 file so that when reading an .h5 file I know which input variables were used.

But when I save the simulation to an .h5 file I cannot find these input variables in the Output directory or in the .h5 file. Is there a way to define these variables so that they are also saved in the h5 file ?

For now, I was able to save these variables on an AnyOutputFile that has the same name as my .h5 file but I would like to have everything in one file.

Thank you,


Hi Dan,

Normally, the study doesn't evaluate constant values at each time step to save time. Therefore, you cannot find constant values in the output folder of the study. One simple hack is to force the study to evaluate the constant value:

Main.InputVariables = {
AnyFloat gh_offset = {0.01, 0.5, 0.2} + Main.Study.t*{0,0,0};
// point to the time variable in your study.

Then, you should see these outputs in the h5 output file, if you have included a pointer to the input variables in your study.

Best regards,