question

iceagesimulator avatar image
0 Likes"
iceagesimulator asked Jason Lightfoot answered

Setting Color Palette Values for Gradient Upon Model Complete

I am wondering if I am able to set the color palette values for defining a gradient after a model run is complete.

  1. I want the red color to be a maximum value that is determined by looking up the maximum value from a table column (upon model completion)
  2. The yellow color will be half the maximum value
  3. The green color will always be a hard coded 0.

Is there a way to have the color palette values be global variables?

The image below has a maximum value of 0.3, but I had to manually look up this maximum value from my global table column after the model was ran once. I want this maximum value for the red color to be set automatically.

image.jpg


FlexSim 23.2.3
color palette
image.jpg (17.9 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.

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered
treenode colorNodes=getvarnode(Tools.get("ColorPalette","ColorPalette1"),"colorNodes");
colorNodes.last.value=0.3;
5 |100000

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