CGA Code - No color option

1584
1
05-23-2016 09:05 AM
MartaBescansa1
New Contributor II

Hi,

I´m writing a rule to colorize a facade that goes as follows. One of the Options I want is to not colorize, but I don´t know what I should write in that case (highlighted in red). Can you help me?

Thanks you,

Marta

------------------------------------------------------------------------------------------------------------

@Group ("Colors")

attr green = "#007d34"
attr orange = "#f59e00"
attr red = "#cd071e"
attr grey = "#c4c4c4"

@Group ("EnergyState")

attr UValue_Is_Facade = 0 // Current u-value

attr UValue_Reg_Facade = 0 // U-value corresponding with the regulation

attr UValue_Rec_Facade = 0 //Recommended u-value

@range(0,1,2,3)
attr UValueColorizer_Facade = 0 // 0 = no color, 1 = UValue_Is_Facade, 2 = UValue_Reg_Facade, 3 = UValue_Rec_Facade

ColorizerUValueSwitch_Facade -->
case UValueColorizer_Facade == 0 : Colorizer_Off_Facade
case UValueColorizer_Facade == 1 : Colorizer_UValue_Is_Facade
case UValueColorizer_Facade == 2 : Colorizer_UValue_Reg_Facade
else: Colorizer_UValue_Rec_Facade

Colorizer_Off_Facade -->
color ()

Colorizer_UValue_Is_Facade -->
case UValue_Is_Facade < 1 && UValue_Is > 0 : color (green)
case UValue_Is_Facade < 2 && UValue_Is > 1 : color (orange)
case UValue_Is_Facade < 3 && UValue_Is > 2 : color (red)
else: color (grey)

Colorizer_UValue_Reg_Facade -->
case UValue_Reg_Facade < 1 && UValue_Is > 0 : color (green)
case UValue_Reg_Facade < 2 && UValue_Is > 1 : color (orange)
case UValue_Reg_Facade < 3 && UValue_Is > 2 : color (red)
else: color (grey)

Colorizer_UValue_Rec_Facade -->
case UValue_Rec_Facade < 1 && UValue_Is > 0 : color (green)
case UValue_Rec_Facade < 2 && UValue_Is > 1 : color (orange)
case UValue_Rec_Facade < 3 && UValue_Is > 2 : color (red)
else: color (grey)

0 Kudos
1 Reply
MicahTaylor
Occasional Contributor III

If you have a texture on the facade you want to preserve in absence of a color...you could try this...

Colorizer_Off_Facade-->

     NIL

but if you are only coloring your facades (no textures) ...then you could just use a white color

Colorizer_Off_Facade-->

     color("#fff")

I hope this helps.

0 Kudos