Elements in a Room

Hello !

I’m trying to create a definition that will add information to a room parameter (the comments for example).

In my case i want to know which Duct System Classification are running in my rooms.

My definition works fine as long as I have only 1 system.
But when several systems run through the room, I’m only able to send one of the name to the room parameter.

Below you can see the definition :

What I would like to do is :

  • Add to the room comment parameter all the “System Classifications” that are running through the room.

I guess there is something to do with “==” and “+” to get a new list but I don’t find the solution by myself.
Any help would be greatly appreciated :slight_smile:

PS : sorry for the bad English, that’s not my native language.

Since I’m a new user, I couldn’t upload 2 image at the time, so here is a screenshot of the model I’m using to test the definition :

@alexandre.mielniczek you can try this solution.

1 Like

Hello,

Thank you for the reply !
Your solution also works to find which duct is inside a Room.
I’m more interested in the System classification which results in more options than the Duct Systems.

What is a problem to me is that I want to fill the room “Comments” parameter with ALL the Ducts “Systems Classifications” inside the room.

I don’t know how to create a list saying (example) :
Room 2 : Exhaust Air and Supply Air
Room 1 : Supply Air
Room 3 : Return Air
Room 4 : Return Air and Supply Air

I don’t know if it’s clear.
At the moment the list we created this way will erase the previous value found in the room comment parameter.

@alexandre.mielniczek in order not to override the previous value written on the room ‘comment’ parameter, you have to combine your into single string your list of input before pushing it using setparameterbyname. See below.

1 Like

Thank you @rexfrancojesse your reply helped me a lot but not in the exact way i thought.

I realize i was taking the problem in the other way around that i wanted.
I was checking what ducts where surrounded by rooms when I wanted to know what rooms where surrounded by ducts.

So i changed the “Tool.GetSurroundingElements” inputs and inverted them, then I had a correct list and with your “String.Join” I could create the list I wanted !

Here is what looks like my definition :

If you have any remarks that can make this definition lighter or more elegant, don’t hesitate !

Thanks again ! :smiley: