I'm currently running a PlantSimulation model from a C# code I wrote, using the COM Interface.
When an unexpected SimTalk error happens, PlantSimulation shows a pop-up asking if I wish to stop the simulation. Is there anyway to disable this pop-up and make it send a message to my COM Interface instead?
Solved! Go to Solution.
You can use the method SetNoMessageBox of the COM interface to turn off message boxes.
Then, as verbalins suggested use an error handler in Plant Simulation to catch errors. You can then communicate back the message using the SimTalk function fireSimTalk Message.
This message can be received in your C# program by implementing an event handler. You will receive the message by a call to the method SimTalkMessage of the event handler.
It's not documented yet, but you should be able to use it anyway. It's expecting a boolean parameter. Pass true to turn off message boxes.