Set element parameter by space number

You won’t get much out of my code as even the parameters name are for a French Revit. So basically you want to :

  • Get which room an air terminal is in
  • From that space get the number
  • Fill the mark parameter inside the air terminal with the room number

For me the way it should be done is getting all the air terminals in your project and retrieve the room they are in (don’t forget to activate the room calculation point in the air terminal family and place it accordingly). The goal is to have a list of space and a list of air terminals. Then you can set a parameter by name inside the air terminals with the list of room numbers.

When i did this code i came upon a bug in the element in space node and i modified the code inside it following this post : Elements in Room vs Elements in Space - #6 by c.poupin

You seem to want the elements in room node i don’t know if it have the same bug. But you’ll need the archilab package to use it.
I’ll suggest you add : mepover,archilab,clockwork,Springs and data shapes to your dynamo it contains really usefull new nodes. it’ll make your work easier.

Edit : Should look like that i guess , it’s pretty easy to do (categories should be air terminals for you , for me it’s in french)

As long as you don’t modify the list you get from family instance the order is kept so filling each parameter from space in each air terminals will work. (if you want to use it with rooms change the node familyinstance.space by familyinstance.room) Plus if you’re using a linked model you should add a code to select the right link.