Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[ FlexSim 19.2.2 ]
I attached you may find my model.
0-model-boxes-in-pallet-change-visual-color.fsm
Solved! Go to Solution.
[ FlexSim 19.2.2 ]
I attached you may find my model.
0-model-boxes-in-pallet-change-visual-color.fsm
Solved! Go to Solution.
This approach is using a local variable of the assign source code. If you open the source code editor by the parchment roll icon, you the header of the source code. There is avariable declared that give you a rank number to the created items.
Object current = param(1); treenode activity = param(2); Token token = param(3); Token createdToken = param(4); Variant assignTo = createdToken; int creationRank = param(5); string labelName = param(6); treenode processFlow = ownerobject(activity);
header of the Assign Labels to Children: Value: Source Code editor
Another approach needs a bit earlier a different setting. The activity create boxes inside pallet has got an option to store all created boxes as an array to a label at the token. The Option Insert in Front of does this for token.item.
An Array can be reduced by the first or last value, and this value is returned thereby by pop() or shift().
The Run Sub Flow activity sets to the child tokens a label named pallet_item. This label holds a reference to a single box of the array.
Hi @Jörg Vogel , In this case, if I create boxes with different labels and I want to assing a color dependig of the label that the box has, how can i do it?
Thanks
perhaps an administrator will move this part as a new question:
Add a new color palette in the toolbox
Edit the number names of the pallete to match with your label values.
use color palette in method fromPalette to assign a color,