Associate a parameter with a room - pipes

Hi all!
I’m a begginer using dynamo and I’m trying to fill a parameter that informs where the pipe is located using the room’s name it’s placed.

So I don’t know the best way to check the room where the pipes are located.
Do you think its easy to get the pipe geometric location and find a room with the same location?
How could I do it?

Thanks a lot

It seems like you already have exactly what you’re after with Element ToRoom and GroupByKey. What specifically are you still needing?

For me its not so clear how it will input the room’s name in the parameter value.
Do I need more nodes to get the room’s name, don’t?
Assign room names to pipes-V01.dyn (28.7 KB)

Getting and setting parameter values are basically the same. Currently, you have your pipes grouped by Room (element) via the GroupByKey node. The unique keys output is the Room associated with each group (sublist) in groups. You can just get the Name (via GetParamaterValueByName) of each Room from that list and then apply it to the grouped elements.

Maybe I need to find another way to do it.


It’s saying “Dereferencing a non-pointer”

One of your names is returning a null. You likely have a group of pipes that didn’t have an associated Room (null). You’ll have to determine how you want to handle those elements.