question

shanice.c avatar image
0 Likes"
shanice.c asked shanice.c commented

How to change treenode into Table class?

I have logic that uses different Table in different condition, I'd like to query which Table to write to first.

In this Table, the pointer value is like "/Tools/GlobalTables/T1", which is treenode class.

1646277469028.png


How could I transfer this "/Tools/GlobalTables/T1" into a Table class, then add values into this Table.

Thank you!

testTable.fsm

FlexSim 21.2.0
tables
1646277469028.png (8.5 KiB)
testtable.fsm (29.1 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 shanice.c commented

Your code is correct, but the T1-T3 tables don't possess any columns.

1646290772880.png

Either set the tables up manually before starting the model, use the reset trigger on the tables for this or utilize the "Table.setSize()" command to adjust the table size directly in your code before writing to it.



1646290772880.png (8.6 KiB)
· 3
5 |100000

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