question

tr-simulation avatar image
0 Likes"
tr-simulation asked tr-simulation commented

Limiting the data exported in the experimenter?

In my attached model, I go to the experimenter > view results > statistics table > select from drop down "duration of procedure phases". How do I export ONLY this table to excel? When I export, there is do much data with so many tabs...how do I limit what is exported to only this table?V4_20230207.fsm

FlexSim 22.2.2
flexsim healthcare
v4-20230207.fsm (14.9 MiB)
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered tr-simulation commented

You can read the table into a global table and export from there:

  1. treenode experimenter = Model.find("Tools/Experimenter");
  2. Database.Connection db = function_s(experimenter, "getDBConnection");
  3. int disconnect = 0;
  4. if (!db.isConnected) {
  5.     if (!db.connect()) {
  6.         return 0;
  7.     }
  8.     disconnect = 1;
  9. }
  10. Database.ResultSet results = db.query("SELECT * FROM [/Duration of Procedure Phases]");
  11. results.cloneTo("DurationOfProcedurePhases");
  12. if (disconnect) {
  13.     db.disconnect();
  14. }

Note that the use of function_s means it may not be supported in the future and you would have to change any code that relied on that function should it cease to function correctly.

· 9
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.