Is it possible to set the same trigger for multiple objects at once?

Is it possible to set the same trigger for multiple objects at once?

javier_pl
Not applicable
125 Views
4 Replies
Message 1 of 5

Is it possible to set the same trigger for multiple objects at once?

javier_pl
Not applicable

[ FlexSim 19.0.0 ]

I have multiple operators to which I would like to configure the same trigger "OnReset" (same Custom Code in my case). Is it possible to do it all at once like with labels or other common parameters?

Regards,


Javi

0 Likes
Accepted solutions (1)
126 Views
4 Replies
Replies (4)
Message 2 of 5

SCHamoen
Advisor
Advisor
Accepted solution

@Javier PL I would create a usercommand with the code you want to execute on Reset. That way you have only 1 place to change or debug code.

Then you put the code on 1 operator (and test it first of course ;-)) and select all the other operators, highlight the operator with the correct code and copy the resettrigger use the "Edit Selected Objects" panel. (you first have to create the resettrigger on the trigger tabpage, otherwise it won't show up in this list)

22450-copyresettrigger.png

Message 3 of 5

javier_pl
Not applicable

In principle this solves my problem! It's a pity that "onStateChange" trigger does not show up although it's already created...I guess in that case the only solution would be to set the trigger via script (e.g. put all the operators in a group and loop through it)

0 Likes
Message 4 of 5

SCHamoen
Advisor
Advisor

@Javier PL

yes the onstatechange is something special. It is not a variable but an eventfunction. If you look at the tree, you will see that you find that node under behaviour -> eventfunctions->OnStateChange

So indeed you have to create your own script to copy those.


Message 5 of 5

javier_pl
Not applicable

Thanks!

0 Likes