ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Why don't run the custom code
hello everybody,
I build a sample, but it doesn't run. Can you help me? thanks! if the content of Queue2 more than 7, Queue2 send item to Queue3. |
#2
|
||||
|
||||
Should be solved by writing your code in the OnEntry Trigger of Queue 2.
OnExit Trigger is only fired when item leaves Queue. In your model this way only once by first item. And there you close output, so it isn´t fired again. If you want to built filling level model you will need some code in both, OnEntry and OnExit Trigger ;-)
__________________
Hemmi Last edited by Sebastian Hemmann; 09-01-2011 at 12:38 AM. |
#4
|
||||
|
||||
Right. But I can´t help you with sending a model because of don´t got your version.
Just close Output in OnExit Trigger if filling level goes under 7.
__________________
Hemmi Last edited by Sebastian Hemmann; 09-01-2011 at 11:44 PM. |
#7
|
|||
|
|||
Sebastian is right, put this code in the entry trigger of queue 2:
if (content(current)>7) openoutput(current); else closeoutput(current); and then this in the exit trigger: if(content(current)<7) closeoutput(current); |
Thread | Thread Starter | Forum | Replies | Last Post |
Custom GUI: Graph OnDraw | Phil BoBo | Tips and Tricks | 2 | 05-16-2013 03:48 AM |
Custom Console | Phil BoBo | User Development | 6 | 12-12-2011 04:19 AM |
how to add custom draw code trigger in flow item | LINWEIXU | Q&A | 10 | 09-10-2009 12:19 AM |
one question about custom draw code trigger | LINWEIXU | Q&A | 5 | 08-03-2009 11:21 PM |
Setting Custom State | Francois Perron | Q&A | 1 | 04-06-2009 02:37 AM |