ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 09-28-2011
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default 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  
Old 09-28-2011
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.