Script modification - Clockwork Room.Name node

Hello guys,
I was wondering if someone has an idea to get room’s name for each door when the Architect creates differents shared parameters to give a name to a room?
I tried to use the Room.Name node from Clockwork but it seems the node uses room Name parameter from Revit.
Is it possible to change the script of the node to get differents room parameters (the ones created by the architect) instead of Revit one?
I went on GitHub to look at the script but it’s hard for me to understand what to change to get another room’s parameter…

Why don’t you use Element.GetParameterValueByName? That would give you the names and you’ll be able to operate afterwards with the ones you need

1 Like

Yes I will get room’s parameters but I couldn’t match them with correct doors. Here my script where the goal is to modify or replace Door.Rooms and Room.Name nodes in order to get other parameters than room name (Revit native parameter) and that match with each coorect door.

From what I can see in this graph, if you replace Room.Name with Element.GetParameterValueByName won’t affect at all your result. Lists are ordered data structures and you can get the names of the rooms by any of those nodes and it will be matching the order of rooms output by Door.Rooms.

Also, if you show us the Door.Rooms output and the error in Room.Name, with the end result you want to achieve, we can assist you better

Thank you, I didn’t think about this but indeed it does the job! Even if I have an error message on every Element.GetParameterValueByName node which are linked to the Door.Rooms node. The message is in french (I have Revit in french) and it’s hard to understand, I don’t know if you will but it says something about a grid/network conversion in Revit.Elements.Element will cause the grid/network order/sorting reduction and it’s not allowed.

I can’t replicate the error:

But I guess it may be due to null values or other problematic data. Show us Door.Rooms output and we may help.

Yes you’re right I have nul values. And when I use Manage.RemoveNulls node before the input of Element.GetParameter I have no more error. But I’m scared by removing nul values, my data won’t organized in the same way as before and those parameters won’t match with correct doors…

In this case I don’t think it will matter, as list keeps its order and as long as you don’t use the Door.Rooms output to set the door parameters and using instead the cleaned list from RemoveNulls.
Basically I mean that once the nulls are removed, the list to work on afterwards is the cleaned one.