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
|
|||
|
|||
Updating Labels
Hello,
I am a new user of Flexsim and I am still trying to learn all the Flexsim concepts. Here is a question that will probably be easy to answer: Logic: Source =>Dispatcher=>Task Executer In the Request transport pick list into the flow tab into the source object, I have my own task sequence. On those points, everything is working well. However, within my task sequence, I want to update some labels from my Task Executer. So here is my question: How can I know which Task Executer is doing the task sequence to use the following command? setlabelnum(?,"mylabel") |
#2
|
||||
|
||||
Alexandre,
It is important to know that the code that defines your task sequence is fired when the task sequence is created. So, if you were to set a label using the setlabel command at one point in the task sequence and then set it to something else later in the task sequence they would both happen when the task sequence was created and not at that point in the execution of the task sequence. Also, if you are dispatching your task sequence to a dispatcher to be passed along to one of many task executers then there is no way of knowing what task executer will get the task sequence. If you are trying to set a label at a specific time during a task sequence then the way I do that is to insert a send message task and then set the label in the message trigger. If you send the message to the source from the task executer then the message trigger will have a reference to the task executer that got the task sequence through the "msgsendingobject" pointer that is predefined. You can then use the message parameters to define what to do with a switch statement and what to set the label to. Hopefully this will answer your question if it doesn't let us know and well answer the question a little more specifically for you. Good Luck, Brandon
__________________
thats not normal. |
#3
|
||||
|
||||
Alexandre,
There is another possibility. If you have a sendmessage tasktype and you don't specify the first parameter, the message is send to the taskexecuter that is executing this task. This means that on the onmessage of that taskexecuter you can simply say: setlabelnum(current, "MyLabel", x); Regards, Steven |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Jörg Vogel (11-08-2010) |
Thread | Thread Starter | Forum | Replies | Last Post |
Updating Labels | Naresh Yamani | Q&A | 7 | 03-28-2008 11:28 PM |
can I use an edit box entry to update multiple labels? | KelvinHo | Q&A | 10 | 03-28-2008 07:17 AM |
Display Labels with the Recorder | tsconcept | Q&A | 9 | 09-26-2007 08:16 AM |