How to add trigger to 3D object created with flexscript?

jkhedekar
Enthusiast Enthusiast
7 Views
3 Replies
Message 1 of 4

How to add trigger to 3D object created with flexscript?

jkhedekar
Enthusiast
Enthusiast

[ FlexSim 23.0.15 ]

I am creating a list of 3D object Queue with flexscript using createinstance() function. For each of it I want to set trigger on enter and exit while I create them to avoid adding them later manually. How can I achieve it?

0 Likes
Accepted solutions (1)
8 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor
Compare object tree with and without specified triggers. Analyze trigger nodes in tree about datatype and data node.

Alternatively create a template with activated triggers and use this later. You can also put customized objects in a custom library and load it later to a new model.

perhaps you can edit a property table or do a query about a property table to insert missing triggers.

0 Likes
Message 3 of 4

arunTTT2P
Observer
Observer
Accepted solution

Use setproperty() to add triggers by code. This will work in future versions also.

Object Queue =Model.find("Queue1");
string y ="Object current = param(1);";//code as string
Queue.setProperty("Triggers.OnEntry",y);
Message 4 of 4

jkhedekar
Enthusiast
Enthusiast
Exactly what I was looking for. Thank you!
0 Likes