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
|
|||
|
|||
Getting Name of Operator Executing a task
I was wondering how you would get the name of the operator currently executing a task if you have multiple operators that can be dispatched? Also lets say I have attached a label to each operator, how do I read the label of the executer currently executing a task?
|
#2
|
||||
|
||||
that is not easy. Maybe you use your own built tasksequence. Therein you send a message to another object. In one of the parameters you send the reference to the active tasksequence as number, e.g. as number one >>tonum(ts)<<. In the Onmessage-trigger you exploit this number as a node. This node is deep in the taskexecuter-tree. With the command >>ownerobject(tonode(msgparam(1))<< you get the reference to the task executer which is executing your task.
The name is quite simple: getname of the reference. Hope, that gives you a hint Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
mutyisi (11-09-2010) |
#3
|
||||
|
||||
Another one from Steven Hamoen.
|
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
mutyisi (11-09-2010) |
#4
|
|||
|
|||
There's also a post here that gives some alternative methods.
Be aware that if you sample ownerobject while the task is queued on a dispatcher, then that value will be cached and you'll get the dispatcher returned even when it's located elsewhere. To get the current object that has it use findownerobject() |
The Following 3 Users Say Thank You to Jason Lightfoot For This Useful Post: | ||
mutyisi (11-09-2010) |
Thread | Thread Starter | Forum | Replies | Last Post |
The transporter and operator task sequence... | syseo | Q&A | 1 | 09-22-2007 01:26 AM |