question

Tuan avatar image
0 Likes"
Tuan asked Tuan commented

How to change the parameters of the experimenter by executing Flexscript

I want to change the parameters of the experimenter by executing flexscript.

How to write flexscript to change the black frames in the picture.

擷取.png

FlexSim 20.0.10
experimenterflexscript
擷取.png (144.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Tuan commented

Get a reference to the node via the "find" method. Then assign a new value to it.

Model.find("/Tools/Experimenter/ExperimentVariables/Variable 2/Scenario 1").value = ...;

Everything you need to know to navigate the tree can be found in the treenode class reference of the manual.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
And you can sample the node in the tree to get the path written for you in your code.
0 Likes 0 ·
Tuan avatar image Tuan commented ·

@Felix Möhlmann

How to get the value (5) of the experiment result in flexscript?

1111.png

0 Likes 0 ·
1666618853816.png (144.8 KiB)