question

Joerg Vogel avatar image
0 Likes"
Joerg Vogel asked Mischa Spelt answered

How can I identify an item to be a tote?

A taskexecuter loads several items one after another. While he loads an item I'd like to know which itemclass that is? The Flexsim objects are identified by their class and subclass which I can compare to the objects in the library tree. I find the items in the Flowitem Bin. But they all have just the itemtype node and a shape node, sometimes the eventfunction OnReceive. I haven't found a node that classify them persistent in their origin formerly as a tote, a pallet or a box. How can I identify an item easily?

FlexSim 17.0.0
identify flowitem
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Mischa Spelt avatar image
1 Like"
Mischa Spelt answered

Hi Jörg,

Besides the obvious solution of having the source create a label or variable on the item to keep track of the class, you could check the shape of the item. For example, if you want to know whether the item is a box, you could try something like

int boxImageIndex = getobjectimageindex( main.find( "/project/exec/globals/FlowItemBin/Box/Box" ) );
treenode flowItem  = model().find("Queue4").first;
int isBox = getobjectimageindex( flowItem ) == boxImageIndex;
msg( "Is it a box?", isBox ? "It is a box!" : "It is not a box...", 1 );
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Arun Kr avatar image
1 Like"
Arun Kr answered

Dear Joerg Vogel,

I think by name you can identify. For instance, a tote object is having the name tote, a box is having name box and pallet having name pallet.

Regards,

Arun KR

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.