Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can we disable user event in run time? after some iterations or model time?
Solved! Go to Solution.
Can we disable user event in run time? after some iterations or model time?
Solved! Go to Solution.
have you tried to wite the condition directly in the user event code like
if(time() < 1000) { // execute your previous FlexScript source code }
but the event will always be fired right?
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.
Anyways the model is speed up with using time()<XXX thanks for the support
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.
Thanks this seems to be better option for me.