I would like to export some tables after experimenter. I don't find the way to export the table Model.parameters.
for exemple, for Global Tables I use : exporttable(Table("A"));
Is there a way ?
Thanks in advance
I would like to export some tables after experimenter. I don't find the way to export the table Model.parameters.
for exemple, for Global Tables I use : exporttable(Table("A"));
Is there a way ?
Thanks in advance
Hi @Nicolas M25, was Jordan Johnson's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.
To export parameter/performance measure values after an experimenter:
The parameters and performance measures are stored in the results database file. If click the View Results button on the Experimenter, and go to the Result Tables tab, by default you'll see a table called "Summary". You can query that table, dump it to a node, and then export it:
treenode dump = Model.find("Tools").subnodes.assert("dump"); Table.query("SELECT * FROM Experiment.Summary").cloneTo(Table(dump)); exporttable(dump, "path/to/file.csv"); dump.destroy();
You can also add more summary tables and configure them individually. You can choose which columns are present, and choose some options about how to aggregate the performance measures. See Experiment Result Tables for more information.
To export a Parameter Table in general:
The basic idea is to find the table structure for the Parameter Table in the tree. Then, the goal is to use exporttable(). But if you just export the table structure, you'll see that the CSV file has "Value: 1" in the value column, rather than just the value.
So instead of dumping it directly, the code in the model first runs a query, so that we can get a better value for column ("1" rather than "Value: 1"). At first, I used the query:
Table result = Table.query("SELECT Name, $2 AS Value, [Display Units], Description FROM $1", paramTableNode, $iter(1).subnodes[2].value);
That works fine, if all your parameters are numbers, text, or null. If they are containers (arrays or maps) then the value needs to be written in a sensible way. So I added a user command that converts those values to JSON, and use that in the query.
This workaround is not straightforward, and maybe a better one is out there. I'll add a request to the dev list to export Parameter Tables more easily.
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved