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
|
|||
|
|||
how to get a reference to currently active task
if Operator is carrying out a tasksequence,i want to konw what task is the Operator doing?
like command gettasksequence(Operator, 0) get the active tasksequence。 I hope there is a command gettasks(Operator, 0) get the active task。 perhaps i can getstatenum(Operator) to know what task is the Operator doing. |
#2
|
|||
|
|||
getcurtask(gettasksequence(Operator,0)) will give you the rank of the task within the active task sequence. This rank can be used in other commands that are found in the Querying Information on Task Sequences page of the User Manual.
If you are only generally trying to figure out what the operator is doing then checking the state is usually the easiest. if( getstatenum(operator)==STATE_TRAVEL_LOADED ) ...do something |
The Following 2 Users Say Thank You to Kris Geisberger For This Useful Post: | ||
Phil BoBo (09-29-2011) |
Thread | Thread Starter | Forum | Replies | Last Post |
Reference to Item in Processor from OnBreakDown Trigger | Eike Schulz | Q&A | 1 | 06-02-2011 02:57 PM |
How to interrupt active task and implement another task? | Ilivid zheng | Q&A | 2 | 01-15-2011 02:30 AM |
Change the active Task | alanturing | Q&A | 2 | 07-29-2010 02:46 AM |
Where can I find Programming Language Reference ? | Robert Liu | Q&A | 3 | 10-26-2009 02:40 AM |
Get view reference | AlanZhang | Q&A | 3 | 03-13-2008 08:51 AM |