How to provide calaculated table cell reference?

How to provide calaculated table cell reference?

rajankur6494
Advocate Advocate
3 Views
4 Replies
Message 1 of 5

How to provide calaculated table cell reference?

rajankur6494
Advocate
Advocate

[ FlexSim 21.1.5 ]

Hi Team,

I have collected statistics using calculated table. Now, I want to show it as KPI in performance measure.

1666934676305.png

I am trying to link calculated table cell in performance measure, but it is showing errors.

Is it possible to do the same?

Thank you!

0 Likes
Accepted solutions (1)
4 Views
4 Replies
Replies (4)
Message 2 of 5

moehlmann_fe
Observer
Observer
Accepted solution

When using the sampling tool to select the calculated table choose the lower entry. This will add the "Table value" option into the Value field.

1666937012691.png

Your code isn't working because you first need to cast the treenode reference into a table class variable in order to use the [row][col]-syntax to read entries. You can see how this is done by inspecting the code of the "Table value" option.

1666936998541.png

0 Likes
Message 3 of 5

rajankur6494
Advocate
Advocate

Hi @Felix Möhlmann,

Got your point.

But I have 1 question here:

When we provide table keyword while referring "Table" in custom code all the table gets populated including calculated tables. So why we need to convert it in table format again to print the cell value?

Thank you!

0 Likes
Message 4 of 5

moehlmann_fe
Observer
Observer

Because "reference" points to the node of the calculated table, not the data table. If you want to use the reference variable, you thus have to convert it first.

You can of course just not use the reference and access the table cell directly by refering to it by name, as you describe, with the Table() constructor.

1666940035643.png

0 Likes
Message 5 of 5

rajankur6494
Advocate
Advocate
Ok @Felix Möhlmann!

Thanks a lot for explanation!

0 Likes