question

WillRS avatar image
0 Likes"
WillRS asked WillRS commented

Change color of processors on reset model

In this part of my model, I am changing active processes over time and showing them visually through colors.

I would like help with a code to change the color of all processors when resetting a model. For example, returning them to the green color, when resetting the model.

Thanks!

Change-color-processors-on-reset-model.fsm

FlexSim 23.0.15
flexscriptprocessorschange color
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered WillRS commented

Just add an On Reset trigger to the processors and set their color to what it should be.

1731399166086.png

If the color is not part of the default choices, use "Color(r, g, b)" where r, g, and are the red, green and blue values of the color mapped to the interval between 0 and 1.


1731399166086.png (2.6 KiB)
· 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.

WillRS avatar image WillRS commented ·

Oh, it's simple!

I was thinking about complex forms, via code, and I ended up forgetting about the triggers of the objects themselves.

Thanks again!

0 Likes 0 ·