question

Kari Payton avatar image
0 Likes"
Kari Payton asked Kari Payton commented

setShape command reverts back to default after "Split".

setShape.fsm

Is there a way to keep the color and shape changes after the token goes through a split box?

1651927969935.png

FlexSim 21.2.4
processflowsplitsetcolorsetshape
1651927969935.png (18.4 KiB)
setshape.fsm (29.6 KiB)
5 |100000

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

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Kari Payton commented

I don't think there's a way to have child tokens "inherit" the color and shape of their parent. Depending on what you are trying to do, you may be able to successfully use the Visualization tab of the Process Flow properties window:
https://docs.flexsim.com/en/22.1/Reference/GeneralModelSettings/ProcessFlowGeneralProperties/ProcessFlowGeneralProperties.html#visualization

This allows you to change shape and color based on label value, and those are inherited. But in the case where you manually set the color and shape of the token, we don't have a way to copy those settings.

· 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.

Kari Payton avatar image Kari Payton commented ·
thanks Jordan. This is better than I was thinking, so I don't have to manually set each flow in the large models.
0 Likes 0 ·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Kari Payton commented

The shape/color don't really 'revert'. The Split activity just doesn't copy these settings to the newly created token(s).

You can do this manually by reading the color and shape from the original token via the 'splitID'.

treenode otherToken = token.splitID;
token.color = otherToken.as(Token).color;
token.setShape(getsdtvalue(otherToken, "shape"));

You could post a suggestion to add an option to copy the color/shape to the split activity.

· 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.

Kari Payton avatar image Kari Payton commented ·
thanks for the response Felix, this works very well also!
0 Likes 0 ·

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.