question

sachin tandulkar avatar image
0 Likes"
sachin tandulkar asked Sam Stubbs converted comment to answer

Accessing Parts inside container.

@Matthew Gillespie

I am trying to access the part inside the container as the cycletime for the machine is based on the part inside the container.

So i used this

treenode Part=rank(item,1);

This is returning "NULL" value. Is there any other way to do it, or I did something wrong.

Choose One
container
· 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.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

It's hard to see what's happening without looking at a model.

So you have something inside your item?

Or are you just trying to access the flow item inside a fixed resource? (That's what item is)

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

It looks right. Now you get access to the itemtype of the first flowitem inside the container item by getitemtype(Part). You can get the value of the label "mylabel" by getlabel(Part,"mylabel"), too.

The alternative is

treenode Part = first(item);

5 |100000

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