You can use the following command to get the system console output when running FlexSim silently:
string systemConsoleText = applicationcommand("getconsoletext", 2);
Attached (runscriptdemo.zip) is a zip file containing 3 files that show an example of how you can silently run a FlexSim model and then export results to a text file, including the output and system console text.
Extract these 3 files to your computer somewhere (I put them on my Desktop).
Edit runScriptDemo.bat so that it has correct paths to where you have installed FlexSim, where the model is, and where the script file is.
"C:\Program Files\FlexSim 2019\program\flexsim.exe" "C:\Users\username\Desktop\test_1.fsm" /maintenance nogui_disablemsg_runscript /scriptpath "C:\Users\username\Desktop\script.txt"
Phil BoBo
Sr. Manager, Software Development