Another Automation - Plenums Heights by Parameter Value

So after being able to use an intersection shade setup to apply air boundaries, I wonder if it could also be done for plenums???

So we already have room/spaces in the Revit model. Could we use a parameter, i.e. “Pollination Ceiling Height”, where as we are could enter the the Ceiling height that we then use a script in the model editor to apply the plenums?

So from my workflow, I end up creating a color coded RCP plan that I use like this that serves as my plenum/ceiling map.

The idea: with the spaces turned on, I could batch select from this RCP view, or apply as i am working, and enter into a parameter the Ceiling Height and bring this value into the model editor, access this value and then apply the plenums, rather than having to jump back and forth from the model editor to the Revit model to make sure you are applying the correct plenum heights to the correct rooms.

Thoughts?

1 Like

Hi @rafaelhok,

Loving the automation feature requests. Yes. This should be possible. If you can share a sample PoMF with us that includes this additional parameter as User Data, we can share a sample code with you that shows how to update the room properties based on the input value. Just make sure you select the parameter to be exported as user data in the first step of exporting rooms.

This should be much more straightforward to do in comparison to the other workflow.

1 Like

So this was the Parameter I created

and here is the .pomf file.
Spaces with Ceiling Height Parameter.pomf (43.4 KB)

Hi @rafaelhok,

Thank you for sharing the model. Here is the code that you can use to automate the process.

I divided the values by 12 to translate them to ft which is the unit of the model, assuming that the input values are in inches.

from model_editor import Editor
editor = Editor()
model = editor.model

for room in model.room_2ds:
    h = room.user_data.get('Space Ceiling Height', 0)
    if h == 0:
        continue
    # divide the value by 12 assuming the input values are in inches
    room.ceiling_plenum_depth = h / 12

editor.update()

Let me know if you have any other questions.

1 Like

yes, almost, i think this line would be something like

room.ceiling_plenum_depth = room.height - h

1 Like

i got it:
room.ceiling_plenum_depth = room.floor_to_ceiling_height - h

the only reason i had to do it like this for this specifically is bc the value i have in the user data is the ceiling height, not the plenum depth. Something for me to keep in mind.

But this was the goal.

1 Like

Thank you, @rafaelhok for clarification.

If it works for you, then mission is accomplished but just so I understand.

Am I right that the value of Space Ceiling Height for some rooms is set to 20’? Since all the rooms in this model are only 10’ that would be an invalid value. What am I missing here?

Yes, and i just realized that i did not export them at the correct full height. the model should be varying with different heights. that my bad.