Using IF Function and Color Override Element in View

Hi there. I’m still a newbie to dynamo, and after watching some great AU videos (Thanks Andrew Duncan & Ben Roberts) on Smart Families, so I have decided to try out making some scripts of my own.

I have started by trying to make an IF function that highlights, with a color override, when a piece of mechanical equipment has a connected flow rate higher than the capacity of the unit. (The Family and has a Yes/No Parameter called “Cooling Air Check” that compares the Actual Flow vs Max Capacity)

I have attached my script. The IF function works, as I have tested it with some text outputs, but the color override does not follow the IF function, and just colors the Mechanical Equipment irrespective of IF true or false.

Please let me know where I am going wrong, thank you very much in advance! (And hopefully this isn’t a pre-existing Topic. I have tried to google it already, and looked on DynamoPrimer.)

Also, I am intending to expand this further, so would really appreciate any tips on:

  1. what I would need to change to carry this out across multiple units (presume using Categories, All Elements of Category etc)
  2. The colour is across the whole unit, but is it possible for the unit lines to be still visible or not overridden?
  3. A color reset would be nice too?!

Thanks Guys :smile:

1 Like

Hi @danielU3R39 ,

Are you able to drop the dynamo file and a dummy revit file?

The true and false inputs for the If node should be the colours themselves, and then the output of this (either the colour if the statement is true or false) should be the input for the Element.OverrideColorInView node. Otherwise what you are doing now is overriding the element’s colour before doing the check.

Once you get this to work, changing the input of element to multiple ones should work just fine.

2 Likes

How to reset these colors?