question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked Logan Gold commented

Bundle Data in global table

As shown in below image, In Global table one cell is assigned as Bundle data. And writing to that cell, but not able to achieve as bundle data

How to create bundle data in global table any feedback on this. I am attaching model where I am trying.

BundleData.fsm

FlexSim 20.1.2
flexsim 20.1.2bundle data
bundledata.png (20.0 KiB)
bundledata1.png (20.5 KiB)
bundledata.fsm (29.5 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

Logan Gold avatar image
1 Like"
Logan Gold answered Logan Gold commented

@Sudheer Reddy, are you wanting the entire Global Table, GlobalTable1, to be a bundle table? Or are you trying to store a bundle table in cell (1,1) of GlobalTable1 - a table within a table?

If it's the first option, then you'll want to check the box called "Use Bundle" in the Quick Properties for GlobalTable1. Then, you can use the "Write to a Global Table" option in the Custom Code activity in Process Flow. That option will write to a Global Table if that table is a Tree table (the non bundle type of table) or a bundle table, it makes no difference.

If it's the second option, then you just need to treat cell (1,1) as a table itself, but there isn't really a dropdown option that does this for you. So you will need to do something like this in the Code Editor, or by choosing the Code Snippet dropdown option, either way in the Custom Code activity:

  1. Table(Table("GlobalTable1").cell(1, 1))[1][1] = Model.time;

Or you can also do something like this:

  1. addbundleentry(Table("GlobalTable1").cell(1, 1), Model.time);

Doing it this way, you'll probably want to add a bundle field to the cell first. You can do this by double clicking on the cell to open the bundle in a Table view, then you can add columns for every field that you want in the bundle. If it's just the one value (Model.time) that you want to add to the bundle, then one field will be sufficient.

If you're trying to do something different with bundles, and these two options do not answer your question, please give us some more information about what you want to accomplish using bundles.

· 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.