How to listen to Object binded but not added trigger through code (NOT PF)? For example, When the item entering in Queue1, I want to execute the variable code (queueOnEntry) of Plane1.
I added an eventListener ,but it does not worked.
Any suggestion is welcome.
Prompt reply. @jason.lightfoot @steven.hamoen @Matthew Gillespie @Ben Wilson
I know that message triggering can be realized, and so can PF. It's just that I'm doing a function development. Should I consider triggers function overload and how to implement it?
Be grateful.
Can the function eventlisten be implemented? It seems that the third parameter of this function named relaynode is not executed.
Answer by Phil BoBo ·
The problem with your model is that your plane reference is wrong. You are trying to reference "Plane24", but the object in your model is "Plane1".
Also, your queueOnEntry node needs to be toggled as FlexScript. Right now, it is just holding a string. Since you want it to be executed, you need to toggle it as FlexScript.
Attached is your example, modified to show you how the eventlisten() command works.
listen-events-and-execute-custom-codev2102_1.fsm
© 1993- FlexSim Software Products, Inc. All Rights Reserved.
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.