question

Matthew A2 avatar image
0 Likes"
Matthew A2 asked Logan Gold answered

Turn off bundle mode for table using FlexScript

How can we "turn off" bundle mode with FlexScript? I am bundling data on model start (referencing this question https://answers.flexsim.com/questions/48017/setting-a-table-into-bundle-mode-with-code.html) but would like to remove the bundle on model reset in order to completely reset the table. Thank you in advance!

FlexSim 19.0.0
custom codetablesbundle
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

Logan Gold avatar image
1 Like"
Logan Gold answered

You can use the same code that Phil mentioned in the linked post, except in the line that uses nodeadddata, you'll use DATATYPE_SIMPLE instead of DATATYPE_BUNDLE:

treenode data = Table("GlobalTable1");
treenode newData = nodeinsertafter(data);
setname(newData, getname(data));
nodeadddata(newData, DATATYPE_SIMPLE);
data.as(Table).cloneTo(newData.as(Table));
destroyobject(data);
5 |100000

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