Override color based on true/false values




I’m working on a script which should override the color of the air terminals to red if their to close to the wall, was wondering if there is a way to override the color of the air terminal based on an IF node?, In the IF node i have 3 lists, which included trues and falses. If one of the listst includes 1 or more true values, override the element to red, if the list in the IF node only includes false values, color green.

Since I’m new on the forum I dont have the acces to post link, so will post link for the Dynamo script and Revit file on google drive.




There was a post on here not too long ago with someone making a similar script.

Found it! here: Using IF Function and Color Override Element in View

It should be able to get you started at least.


I have have tried the link you have linked, but it simply overrides the color of the airterminals to a color without considering the distance from the wall which I have defined in the script.

If the placement of the airterminals is to close to the wall, it will turn true value, if the airterminal is in good range from the walls it will turn false, so if the lengths between them is too close, then i would like the airterminals to turn red


Ah I understand where you are at now. Try this:

Note that the List.ContainsItem is at the second level (@L2). You get this by clicking the arrow and checking the first box that says Use Levels. Hope this helps. If the list of true and falses are on a different level, you will have to adjust it.


Thanks, got it working now