question

Vallaban G avatar image
0 Likes"
Vallaban G asked Jason Lightfoot edited

How to change the value of node after getting getvarnode ?

getvarnode(Model.find("Combiner1"), "componentlist").as(Table)[1][1] - I want to change the value of this node

FlexSim 22.2.1
combiner - componentslist
5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered
Table components = Model.find("Combiner1").as(Object).attrs.variables.subnodes["componentlist"];
components[1][1] = 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
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Just add "=4" to set it to 4 as you already have a reference to the table value, not a treenode.

The question title doesn't refer to using tables just treenode. To set the value of a treenode you would just use '.value='

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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