Sorting points according to room names

Hi guys,

I have some points and each point has a name; for example S1234. I want to see, which point is in which room. So I used the block “Select.GetRoomAtPoint” from Archi -Lab package. But I cannot sort them based on room names. it appears just the word “Room” in front of point names! How can I get the room names in front of the point names?
At the moment I have just the word “Room” in front of points. Actually I have 894 points and 520 rooms!

Can you post an image of your graph, or the dyn itself (if you can’t upload here use an external host like google drive)?

The yellow block hast just the word “Room”. But I need them to be sorted by room names.

Thanks in advance…

There’s how you get the name… by sort by names do you me alphabetically sorted by name is is the order they populate themselves in fine?

As you can see the little python script just attenuates the first few letters of the string so don’t have "Name : " repeated for every room, I’m sure theres a way to do it with a codeblock or dynamo node but a simple 2 line python script is easier in my opinion.

There’s the code for the python script


You could just use an Element.GetParameterValueByName node instead of the Parameters.ParameterByName node. This would return just the value.

You can use List.SortByKey

Thanks. It works perfect :+1:


Thanks for your response. I just have a problem. There ist no output after List.SortbyKey, while I run it. I will atach the graph. It will be very nice, if you can check it.

you have a few points which are not in rooms, causing the element.getparametervaluebyname to return null. Try replacing the null values with an unplaced room element with a name ‘not in a room.’

1 Like