Hello,
I am trying to give a value of an edit field in my GUI as equation value of a constraint in OptQuest by using a script. The following script did not work:
assertattribute(node("MODEL:/Tools/GUIs/IPK Optimizer/Input DC"), "coldlink", DATATYPE_STRING); node("MODEL:/Tools/GUIs/IPK Optimizer/Input DC>coldlink").value = "@>objectfocus+/Tools/OptQuest/constraints/Constraint 1/Equation"; coldlink(node("MODEL:/Tools/GUIs/IPK Optimizer/Input DC>coldlink")); applylinks(node("MODEL:/Tools/GUIs/IPK Optimizer"));
The value of objectfocus is: "MAIN:/project/model".
I also tried it without the third line:
coldlink(node("MODEL:/Tools/GUIs/IPK Optimizer/Input DC>coldlink"));
To be honest: I have no clue what the coldlink() command do. It was only a guess, that this function could convert a node into a coldlink.
Secondly: Is there also the possibility to use the value of an edit field directly in a script? Somehow like this:
OptQuestDesign.last.value = "[Sink Statistic]>" + numtostring(Value of edit field)
Thanks!
Sebastian