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
|
|||
|
|||
a question about the command "getitemtype"
If I am in the queue3, I want to get the item type in the queue4.
How do I write the correct command? I already try the following stupid code,but it can't work. treenode item = parnode(1); treenode current = ownerobject(c); int port = parval(2); treenode cc = node("/Queue4",model()); getitemtype(cc,item); or getitemtype(item,cc) thanks for your help in advance. Last edited by Vic Li; 10-04-2008 at 11:48 PM. |
#2
|
|||
|
|||
The item in your code is the one that fires the trigger - I assume in Queue3.
Once you have the pointer to the other queue (6 or 4 in your example?) you can use rank, first or last to find one of the items in the other queue, which could have any number within it. Code:
int type=getitemtype(rank(cc,1)); Code:
treenode otheritem=rank(cc,1); int type=getitemtype(otheritem); |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Tomasz Kisiel (06-11-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
The "Simple Question" Thread | Xavier Jackson | Q&A | 202 | 08-10-2009 09:44 AM |
I have a "priority" question | Li Chin | Q&A | 6 | 09-15-2008 08:11 AM |
Is it possible one object comprised of the function of "combiner" and "separetor"? | Vic Li | Q&A | 1 | 08-19-2008 04:41 AM |
is there a command opposite to "destroyobject" which create a object? | KelvinHo | Q&A | 3 | 07-03-2008 08:09 AM |
Does the "loaduserlibrary" command has a flaw? | Steven Hamoen | Q&A | 1 | 06-03-2008 02:47 PM |