I am working with a cluster of Boolean LED indicators. When a sub-test fails, I want to programmatically change the OFF color of one LED from dark green to bright red. Can I do this for LEDs in a cluster? If so, how? What if the cluster is a type def?
The image below shows the first Boolean LED in the cluster indicating ON (PASS). The second LED indicates OFF (FAIL). The third LED shows OFF (Not Executed). I want the properties to go from those seen in the third LED to those shown in the second LED when the sub-test fails.
Solved! Go to Solution.
You can right click on each cluster element to create a reference or property node for them.
Rather than using a Boolean indicator to differentiate between 3 states, why not use a color box indicator? Then you're just using data values and not messing with property nodes when you don't need to.
It might seem easier now because you're partway done, but if you use color boxes it's a lot easier to use the same control elsewhere (you don't need to have the indicator and all of its property nodes copied) and it allows the control to be used in an array (controls in arrays have to have the exact same properties, but can have different values).
When I do this I usually make a set of premade, pre-labeled color constants (such as test run, test pass, test skipped, test not run yet, and test error) and then re-use those in the code to set the indicators.