Can we disable user event in run time? after some iterations or model time?
Can we disable user event in run time? after some iterations or model time?
have you tried to wite the condition directly in the user event code like
if(time() < 1000) { // execute your previous FlexScript source code }
yes. You have an option to repeat in the user event? Perhaps you can change the flag or value in an attribute node dynamically. But I am not sure that you can manipulate this after hitting run.
The Repeat event option is a variable. You can activate and deactivate the value by FlexScript source code. You need the reference to the Event Object in the model tree in the subtree Tools.
setvarnum(userEvent,"repeat",0);
This deactivates the repeat option. If you need the ability to repeat the event after reset you have to activate it manualy in the user event properties, or by an OnReset trigger and source code.
5 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