Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!



Change Flow System Colors - Dynamically

Recommended Posts


I'm trying to build a sample flow model where, with a button I can toggle between two colors at a flow source (or its output node). I've uploaded a sample model if someone would like to help.

Basically, I have a single DefaultEntity with two color symbols (red for hot and blue for cold, for this example). Since Add-on processes in flow are only available for Run Initialized and Run Ending, it seems I won't be able to do this dynamically. (Perhaps this should go in the suggestion forum, but I thought someone's figured out how to do something like this already.)

I know, I can use multiple sources, but my goal is to eventually use this for tens of colors, and you can all see where this is undesirable.

Any thoughts?


Color Control for Flow Systems.spfx

Share this post

Link to post
Share on other sites

One solution:

I created a state variable called IntegerState1 and set its default value to zero. I also set DefaultEntity's CurrentSymbolIndex to be "IntegerState1". Then, in the process you have attached to the button click event, the new value can be set to !IntegerState1. Please note that his expression only works for two color values and relies on the implicit type conversion of integers to booleans. For more than two colors, you might want to use something like Remainder(IntegerState1 +1, NumColors) for the new value on the assign step, which will cycle through the colors one per click.


Share this post

Link to post
Share on other sites

  • Create New...