Strange Error Executing Table Cell

Strange Error Executing Table Cell

hans_d
Not applicable
2 Views
2 Replies
Message 1 of 3

Strange Error Executing Table Cell

hans_d
Not applicable

[ FlexSim 21.2.4 ]

I am trying to execute a probability distribution that is in a global table cell. I would like to assign the result to a label, and also use the value to define a delay.

It is strange that is works perfectly on one computer. On the other computer I am getting this error:

exception: FlexScript exception: Property "dataType" accessed on invalid node. at MODEL:/Tools/GlobalTables/GlobalTable1>variables/data/Row 1/Col 1

Here is the test model:

Distribution_From_Table_RevA.fsm

Thanks!

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

JordanLJohnson
Autodesk
Autodesk
Accepted solution

The error is complaing about calling getstream() in your code. To properly use streams in a global table, you need to make two changes:

  1. Change your code in the global table to say
     uniform(10, 20 param(1))
  2. To pass in the stream, you need to evaluate the cell. In the Assign Labels, use
    Table("GlobalTable1").cell(1, 1).evaluate(getstream(activity))

I will also say that this feels like a model parameter. You can add a parameter (in a separate Parameter Table, if you want), and set its type to Expression. Then you can add the exact same code in step 1 above. The step 2 code would change to:

Model.parameters["MyParameter"].evaluate(getstream(activity))
.


Jordan Johnson
Principal Software Engineer
>

0 Likes
Message 3 of 3

hans_d
Not applicable

Thanks for you response. The model works after making the changes.

I think there is a comma missing in your code for the global table.

uniform(10, 20, param(1))

I agree, this could be a model parameter. I will look into it. In the parameters table, I am not sure what to set as reference and On Set. I using the eyedropper to reference one of the delay activities but it does not accept it.

snag-673090.png

0 Likes