AnyLogic 6 Discussion

Is there a way to stop a model from a code (e.g. a timer or transition)? I've used getEngine().finish() but is works different than stoping the model using stop button on the toolbar. I'd like to have the same effect as getEngine().stop() from a button, but this code creates an exception if used in timer's code.
Hi Dibpin, You can use the code bellow. new Thread(){ public void run() { getExperiment().stop(); } }.start(); Best regards, Serge.