dempirical on a query

dempirical on a query

guiroehe
Collaborator Collaborator
246 Views
2 Replies
Message 1 of 3

dempirical on a query

guiroehe
Collaborator
Collaborator

Hello,

Is there a way to apply dempirical on a table query? I am not getting the expected result.

guiroehe_0-1748451943224.png

I can create a function to mimic dempirical, but this seems overkill.

Thank you for any help.

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

regan_blackett
Autodesk
Autodesk

dempirical() only accepts table references that are either a named global table (str), stored in a node in the tree (node), or a ranked global table in the Toolbox (num).  It does not appear to have been updated to include in-memory tables created by Table.query() or members of the Table class.  Instead of passing your Table variable t into the function, use the name of the Global Table that you used cloneTo() with.  For Example, 

demprical("GlobalTable2");
0 Likes
Message 3 of 3

guiroehe
Collaborator
Collaborator
Accepted solution

Thank you, but this is not what I was looking for. The example above is to highlight that using "t", the query, does not produce the expected results, despite it is a "Table" variable.
I made it work by creating a dynamic label in the object when the simulation starts, setting it as a bundle, and cloning the query results to that label. Honestly, a lot of overkill.
It would be nice if dempirical:
- would support queries as inputs
- would allow one to choose the column to be used to draw the percentages for the selection
None is very hard to implement.
Thank you anyway.

0 Likes