question

IT Asset avatar image
0 Likes"
IT Asset asked Kari Payton commented

How can I export a dashboard without having to open it first?

There is a user command I use in my model that exports all of my dashboard charts as csv data so I can manipulate them in an outside program. I've realized the dashboard has to be open to actually record anything. Also, if I leave it as the active tab while the model runs, it runs slower - so typically I try to have it open but not have it active while it runs. However, if I don't remember to click onto the dashboard tab before I export, the data in the export is incomplete. For one off runs this is inconvenient but workable for now, but it seems to really cause problems if I want to run my model as an experiment since the dashboard data is not captured properly even when I select "Save dashboard data for each replication".

So I'm curious if there is a better way to do the export so I don't have to rely on remembering to refresh the dashboard tab before I export and how I can make this work with the experimenter?

Here is a sample of the user command:

//=====================================================//
//============= Create the Results Folder =============//
//=====================================================//
string strFolder = concat(modeldir(),strModelID); //Sets "strFolder" = the directory the model is in + the name for the new folder.
applicationcommand("createdirectory",strFolder); //Creates a folder with the new name assigned in the previous line

string strmytable;
string strmycsv;
string strfilename;
treenode tnMyDashboard;

//---------------------------------------------------//
//------ Custom code to export dashboard data -------//
//---------------------------------------------------//

// ++++++++++++++++++ Output Dashboard ++++++++++++++++++ //
tnMyDashboard = node("Tools/Dashboards/StatsDashboard", model()); 

strmycsv = "\\InboundCST.csv";
strfilename = concat(strFolder, strmycsv); //name for csv to export to
function_s(node("Tools/Statistics/Inbound CST Shipments", model()), "createCSV",strfilename); //exporting dashboard data (same thing as right click on dashboard object and select export as csv)


FlexSim 16.2.1
experimenterexport
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

Matt Long avatar image
1 Like"
Matt Long answered Kari Payton commented

Dashboards will collect data whether they are open or not. It's a statistic object that's actually doing the data collection and the dashboard widget that's viewing the data.

The only exception to this is the Process Flow chart which currently has a bug requiring it to be viewed once before it will start collecting data. Once the Process Flow chart is opened and viewed (and the model reset), you can close the dashboard and continue the run.

· 2
5 |100000

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

IT Asset avatar image IT Asset commented ·

I guess the bug is the problem since almost all my reporting are process flow charts.

1 Like 1 ·
Kari Payton avatar image Kari Payton commented ·

I have the same problem using process flow with dashboards. If I forget to view the dashboard no statistics are collected.

0 Likes 0 ·