Process Flow + Item Array + Data controls

Process Flow + Item Array + Data controls

gregory_p_chin
Not applicable
645 Views
2 Replies
Message 1 of 3

Process Flow + Item Array + Data controls

gregory_p_chin
Not applicable

[ FlexSim 16.0.1 ]

help1.fsm

See attached model.

I have an array of items that I want to set item# and color based on the token label "setItemLabel"

The logic I have in the custom code activity will only set the data controls for the first item in the array.

I need help writing the code necessary to apply the data controls desired to all items in the array at the custom code activity.

If successful, the transporter will unload all 5 items. The items will then change to itemtype 6 and be colored purple.

Accepted solutions (1)
646 Views
2 Replies
Replies (2)
Message 2 of 3

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

I updated this model to reflect the changes you wanted.

501-unload.gif

I added an Assign Labels activity in the Unload Items subflow to record off the current item. The Unload activity now references this label and I moved your Custom Code activity into this subflow and it also references the new item label.

502-unload.png



Matthew Gillespie
FlexSim Software Developer

Message 3 of 3

matt_long
Not applicable

500-setarraycolor.fsm Since the Run Sub Flow activity let's you set labels on the created tokens, you could move your Current Item activity's logic into the Unload Items activity. Then you can just leave the label access as Label Access on Parent Only as the assigned labels will be given to each individual token and not the parent.