General Discussions
Has anyone seen/used this code

Hello,

I have taken over a job and the previous creators used:

SState0Color
SState1Color
SState2Color
SState3Color

to pull in the colors form the style settings without pulling in the alarm color override. I have copied and pasted their code (from a working widget) and pasted it into my own but it does not work.

The code is:

\Root\Value == 0 ? SState0Color : ( \Root\Value == 1 ? SState1Color : ( \Root\Value == 2 ? SState2Color : ( \Root\Value == 3 ? SState3Color : InvalidColor)))

As far as I can tell the code is just running through the Value and matching the color according to the StateColor of that value.

Has anyone used these SStaeColor in anything? or done the same thing with using different code?

Thanks.

Edit 1: I have found that if I use a bitmap and then the code works on the Valve image but not an image of the pump. One step forward but now I need to find out what the difference between two bitmaps are.

Hello, I have taken over a job and the previous creators used: **SState0Color SState1Color SState2Color SState3Color** to pull in the colors form the style settings without pulling in the alarm color override. I have copied and pasted their code (from a working widget) and pasted it into my own but it does not work. The code is: \Root\Value == 0 ? SState0Color : ( \Root\Value == 1 ? SState1Color : ( \Root\Value == 2 ? SState2Color : ( \Root\Value == 3 ? SState3Color : InvalidColor))) As far as I can tell the code is just running through the Value and matching the color according to the **StateColor** of that value. Has anyone used these **SStaeColor** in anything? or done the same thing with using different code? Thanks. Edit 1: I have found that if I use a bitmap and then the code works on the Valve image but not an image of the pump. One step forward but now I need to find out what the difference between two bitmaps are.
edited Jul 20 '22 at 9:06 pm
51
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft