Hi Chris,
When editing the XML, sometimes I need to remove old variables. However, when I do this, it resets all of my saved variable sets to default values. Is there some way to avoid this reset?
I’ve considered just moving the variables to a junk site in the code so they’re there, but don’t show up in folders, but that seems a bit silly. Another alternative is to set up some versioning software so that I can roll back to the previous state before the switch to default. But I just thought I’d check with you and see if there’s a more straightforward approach.
Thanks,
Lindsey.
Hi Lindsey,
When editing the XML, sometimes I need to remove old variables. However, when I do this, it resets all of my saved variable sets to default values.
I think this is a flaw in the code for loading variable sets. Currently, if a saved variable set contains a value for a non-existent variable, the variable-loading code issues an error message and quits. Instead, it probably should issue a warning about the missing variable and then continue processing the rest of the set. I’ll try to get this change in to the nightly build soon.
In the meantime, one workaround would be to manually remove the deleted variables from your saved variable sets. Variable sets are stored as XML files in $HOME/Documents/MWorks/Experiment Storage/<experiment>/Saved Variables
. You can open the relevant file in a text editor and remove the variable_assignment
entry for any deleted variable.
Cheers,
Chris
Hi Lindsey,
Currently, if a saved variable set contains a value for a non-existent variable, the variable-loading code issues an error message and quits.
This is now fixed. As of tonight’s nightly build, if a saved variable set contains a non-existent variable, MWorks will issue an error message, but the remainder of the variable set will be processed as usual. To expunge the deleted variable and eliminate the error message, simply re-save your variable set after loading.
Cheers,
Chris
Chris,
Thanks so much- this is really helpful!
Lindsey.