Hey everyone, I need some help. I have been trying to find a way to change a family type based on a parameter value and I am having trouble. In this script, I find the “specified supply airflow” and then divide it among all diffusers in a space. I’d like to give cfm ranges and automatically have the family change to the correct type based on what range it falls in. I was thinking the “if” node, but can’t seem to get it to function how I’d like. Any help is appreciated. I’ve attached the dynamo file and a screenshot.
That’s what I tried. That’s the end goal is to select actual families based on parameter values that are pulled from the revit file.
The entire script reads “specified supply airflow” of a space and divides that among all the diffusers it finds within a space. I would like to take the divided values and auto pick a family based on a given cfm range (i.e. select Family 1 if cfm is between 0-120 cfm, etc.)
Also, could you elaborate a little on what exactly that code block is doing? I get the general idea, but I’m a little inexperienced with code blocks.
All good.
I am out of the office for a couple of days. I’ll get something on range input posted when I get back as I also have an idea on how to do this with OOTB nodes.
Unless there are any other ideas from the forum? Python gurus?
Righto, I knew I had seen something like this before.
I’ve just typed this out on my phone but it should be able to be adapted for your purpose @robertsb2010
Example:
X=input list of values
a=family type 1 for values 0 to 100
b=family type 2 for values 101 to 200
c=family type 3 for values 201 to 300
d=family type 4 for values 3011 to 400
Wow, that code block is nice! I got it to work after toying with the code block contents a little bit. I was definitely confused by the code block workflow at first.
Also, I had to convert my list to ft3/sec as Dynamo doesn’t actually read cfm the way that Revit does. That wasn’t hard to do at all, just another step. Thanks for everyone’s replies!