These are chat archives for AnyBody-Research-Group/AnyPyTools

28th
Sep 2017
Sebastian Skejø
@sebastianskejoe
Sep 28 2017 16:16
Hi. I think that setting the Data-field of an AnyFunInterpol throught the SetValue-macro, might not be working. I seem to be getting different results depending on what value I set in the .any-file eventhough (I think) this value should be overridden by the python-script. Is this a known issue or am I doing something wrong?
Sebastian Skejø
@sebastianskejoe
Sep 28 2017 16:32
Here are three different file settings:
http://pasteall.org/pic/show.php?id=119069
http://pasteall.org/pic/show.php?id=119070
http://pasteall.org/pic/show.php?id=119071
The dashed line is the .any-file run without changing the Data value and the solid lines are the results when setting the value through SetValue. As you can see, solid line of the values corresponding to the file values, does follow the dashed line as expected, but the remaining two solid lines are different from picture to picture, indicating that the original file values in some way affect the results when using SetValue (which they should not).
Morten Enemark Lund
@melund
Sep 28 2017 20:25
Hi @sebastianskejoe. Thanks for reporting this. It is easy to check if there is a problem. Just try to set the value then dump it again. If you don't get the modified value then there is a problem.
You can also try to change the value directly in AnyBody GUI. Just find value in the model tree, right click and select "set value". My guess is that AnyBody thinks the Data variable is a constant, and won't allow you to change it.
Morten Enemark Lund
@melund
Sep 28 2017 20:31
That is usually fixable. We you set the variable in AnyScript do: Data = DesignVar({{......}});
That will force AnyBody to consider the variable as not a constant. Hope it helps. Otherwise, please open a issue on GitHub