Compare Door Rating to Wall Rating

I’m trying to put together a graph to compare the host wall’s fire rating and the rating of any doors that are hosted in said wall. I can pull the walls & doors and get the parameters, but I’m not sure how to actually compare the results. Essentially I have:
1 hr
2 hr
3 hr
20 min
(should be rated)
90 min

At the most basic level I’d like to compare the lists and be able to pull out the element ids of the doors that are not rated if the host wall is rated. Long term It would be great to actually check if the door is the proper rating relative to the wall, but I’m happy with one step at a time.

I’m using the doors Aaron released a while back, not sure what the OOTB rating parameter is.

Doors-Compare Wall Ratings.dyn (26.1 KB)

Thanks! :beers:

Check for blank values ("") to see if an element is not rated. How do the ratings work relative to one another? I’m guessing you’ll need to convert your hours to minutes first.

Honestly, if I could compare Has a value to Has no value I’d be good in the short term.

20 - 1 (both have values)
“” - 2 (missing a value)
90 - 3 (both have values)

Checking for a blank value “” isn’t so much the issue as it is comparing the two lists. Since both are strings I’m not sure how to go about it.

I know what you are showing is a sample but could this work for you?

1 Like

A dictionary might be best as it will allow those other pesky situations (ie: smoke seal, etc). Build a dictionary from the wall eating values (ie: {“1”:20,“2”:60,“3”:90}). Then convert the wall values to a string, and use that to get the corresponding value from the dictionary. Once you have the required rating compare the value via an == node (or a < node if you don’t mind over eating doors occasionally for some design reason). Filter the list of doors by the result and you can run from there.

1 Like

You’re talking about two separate functions - unrated doors and appropriately rated doors. The reason for checking for blanks is to determine unrated doors. You would have to check to see if your wall is rated (value != "") AND that the door is not rated (value == ""). Object type (string vs number) doesn’t really matter if you’re using an If statement or a dictionary, unless you start looking at minimum allowable ratings. Then you would have to convert to a number using String.ToNumber.

1 Like

Could you explain the syntax in the last code block? I understand x<2 - not sure about the ?20 (etc)

Conceptually I understand what you are doing, but I’m a little lost in the execution. The wall values are already a string, so the conversion isn’t required. I’m also not quite sure why the dictionary doesn’t display the values in the same order they are input, which seems to be throwing off the == node results.

edit- I suck at multi-quoting

This looks like it works, at least for a quick check comparing walls to doors which is all I need at the moment. I’ll keep poking at this to try and figure out smoke assemblies. Thanks :beers:

I’ll try and post a sample later, but Dictionary.ValueAtKey is missing in your list. :slight_smile:

The question mark is for the If statement.

X < Y ? true : false ;

After you make your statement (==, !=, >, <=, &&) you need a question mark before you give the values of true and false. The true and false values are then separated by : (a colon).

In my example provided above I gave a running if statement.
x < 2 ? 20 (true value) : x < 3 (second if statement triggered if the first one is false) ? 60 (true for the second but false for the first) : x == 3 (third if statement triggered if the first two are false) ? 90 (true value) : “Not Rated” (if all the if statements are false) ;

I hope this helps. I can probably give a better explanation if you need.

I think that makes sense. In typical family parameter syntax it would be roughly: if(x<2,20(if(x<3,60(if(x=3,90,“Not Rated”)))))?

The operators (==, !=, &&, etc) are just design script?

Yes, your Revit if statement looks correct.

Yes those operators are design script.

You can find out some more on them below. I find it cleaner and easier to read if some things are shortened using design script.


Thanks! I forget about that sometimes. Sounds like an excuse to use more Dynamo :beers:

1 Like

Here is the final graph I ended up with. Has some additional nodes to create & export an XLSX file to the current document directory with all of the output information. Could probably be refined quite a bit but it works.