question

asb.p avatar image
0 Likes"
asb.p asked Matthew Gillespie commented

How does a table view work in Flexsim GUI?

Hello,

I am importing some table data from a txt file. Right now I am using global tables to use that data.

In the next step I want to import data and from node tree so that user of the model cannot have direct access to input data.

I want to create create some views similar to global table views in my custom GUI where users can see & edit the some of data.

I want to understand how table view works.

How to display & edit a simple tree structure in the form a table? I want to dynamicly pass the node value from a combo box. Please let me know if any addtional data required.

Thanks in advance,

Praneeth Akondi.

FlexSim 17.0.13
guicodingcustom guicustom dashboard
tableview.jpg (54.4 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

Matthew Gillespie avatar image
4 Likes"
Matthew Gillespie answered Matthew Gillespie commented

A table view just needs to have its viewfocus attribute point at the data you want to display and edit.

From the user manual:

viewfocus: The viewfocus attribute is required for the table control. It specifies what the table will "point at". It is like the objectfocus attribute. It should have text data that is a path to the node that contains the table information. There are two options for the structure of the table node itself. It can be a list, meaning it contains a number of subnodes. If the table node is a list, then the table control will show just one column of data, and the text in each entry is the data, either text or number, of each of the subnodes in the list. The row headers of the table are defined by the names of each subnode. The other option is to have the table node be an actual table. In this case the table node contains a set of subnodes. Each subnode is one row in the table, and it contains subnodes, each being an individual entry in the table. The number of columns that will be shown in the table is defined by the number of subnodes of the first row. Row headers again are defined by the names of each row node. Column headers are defined by the names of the subnodes of the first row node. Please note that with a table, it is a direct view into the table data. This means that any changes made in an entry in the table will be applied as soon as you click off of the entry. This is different than using coldlink in other controls, where changes are only made when the user hits the Apply button. This is why the table control uses the viewfocus attribute, because it is a direct view into the data of a model, just like an ortho or perspective control.

The table will display all the data held by the node you point it at. There isn't an easy way to limit what the table shows or what it lets you edit.

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