Hi all -
I’m looking to automatically save the Performance Measure Report after running Experimenter and am unable to find the command that would do so. Can someone help?
Thanks!
Hi all -
I’m looking to automatically save the Performance Measure Report after running Experimenter and am unable to find the command that would do so. Can someone help?
Thanks!
What our team is trying to do is run Flexsim (no UI) using a command line interface from an external software application. Specifically, we have already figured out how to update the model using OnModelOpen, change Experimenter settings, and automatically start an Experimenter Run.
The last remaining thing that we haven't been able to figure out is how to automatically create and save the HTML Performance Measure Report. Ideally, we could use a set of commands that would allow for setting the report name, save location, and automatically save the report. I would expect to place this logic on the End Of Experiment Trigger, where thereafter, we could save the model and close Flexsim.
Since the code behind all buttons and options in FlexSim can be viewed in the tree, I had a look at the code of the "Generate Performance Measure Report" button in the Experimenter results window. This is what FlexSim does. It is pretty well-commented so I will post it verbatim, and leave it to you to figure out the relevant parts.
function_s(ownerview(c), "refreshreportprefs"); //export the experiment report //get a filename for the export and save it string directory = modeldir(); if (stringlen(directory) < 3) directory = documentsdir(); string filepath = getfilebrowse("*.html", "HTML Document", "", directory, 1); if (stringlen(filepath) < 4) return 0; treenode reportfilepath = getvarnode(ownerview(c), "reportfilepath"); sets(reportfilepath, filepath); //change the cursor to the hourglass setcursor(3); function_s(ownerview(c), "generatedashboarddata"); //generate the report html and images function_s(ownerview(c), "generatereport"); //open the exported experiment report in the user's default web browser rundocument("open", filepath); //change the cursor back to the default arrow setcursor(1);
The code references some other event functions on the GUI, you can find the whole thing at VIEW:/standardviews/statistics/PerformanceMeasures/Generate Report>menupopup/Performance Measure Report
I copied the code and modified slightly to set the file name (with a timestamp) and the file path (as opposed to using the save dialog). When I run it, nothing seems to be happening. Perhaps there is more that I am not understanding. Any help would be greatly appreciated.
@Mischa Spelt, for some reason, I am unable to post the code that I referred to. I also tried to post a txt file of the script, and still had issues, so I am attempting to just send an image of the script (hopefully this works!). As I indicated before, nothing seems to be happening when I run this script.
@Mischa Spelt, Issues resolved. You can ignore this! Sorry for the trouble.
Have you read this article? Submitting Code and How to Avoid Being Blocked
@Matthew Gillespie Yes. I add a CODE block, paste in my script, and when I click Submit, the button disables, but the comment does not post. I only got "blocked" when I added the code in an answer, which I was avoiding since I was not answering but simply trying to reply to Mischa's suggestion. Thanks.
8 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