Door Mark By Room Name

it seems like i suck :frowning:1.dyn (9.4 KB)
Project2.rvt (1.3 MB)

OK, you just need to insert a GroupByKey node after Get To-From Room to group the doors by room, and to modify List.Count using List@Level like so:

If you read the all post linked the solved is there. Just add “GroupByKey” where the list are the doors and key is the list “ToRooms”

my alphabetic sequence node is not working, it’s red and it says it’s not for this version. i havent done anything, i dont know why this happened?! i reinstalled it but nothing.

Red nodes mean the package is either uninstalled or the version you have installed is conflicted due to multiple versions of the same package. Double check your package paths are available, and that you have a version with that node in it.

It uses to be red if you don’t have that node or package. “List.AlphabeticalSequence” is in the Clockwork package.

thanks guy for all your time and effort, i went through all your comments, i added the listbygroup with @@L2 and nothing has changed. there’s still that extera digit there, it looks like D1011a, what i want is D101a.1.dyn (10.3 KB)
Project2.rvt (1.4 MB)

The extra digit is because using the Element.Name node for Rooms produces Room Name + Room Number. Replace the Element.Name node with Element.GetParameterValueByName with the parameterName input as “Name” and it will exclude that extra digit:

In this case, though, it seems more like the rooms’ names should be “UNIT” and their numbers should be 101, 102. If 101 and 102 were set as the rooms’ numbers (as pictured below) you could use the room number parameter value instead of room name, and eliminate the need for String.Remove on the Room Name parameter value:


thank you so much!

can some point me in the right direction for the Get To-From Room custom node? The ones I’ve been downloading from the packages are all broken…

change Elements to elems in the input and you should be good to go.

Thank you that seemed to work but now I am getting an error from my List.
It says "Warning: List GroupByKey operation failed. Number of items does not match the number of keys. I’m not really sure what that means or how to fix it… all my rooms have been placed and their are no unbound rooms in the project.

This is usually a list structure error. Looks at both of the inputs into the group by key node in watch nodes and confirm marching counts and depths. Likely you have a door with no room (ie the exits which open to the outside), and the result of that could me a ‘null’ or an empty list (not sure as I can’t test right now).

You’re right! It was all of my “Exterior” Doors that were causing the issue. Do you know how to get the formula to work if I have “Exterior” Doors, such as doors that are not going from one room to another?

What would you want the value to be? There are options with if statements, list appending, and more. But if you don’t know what you want to get I can’t give you the right recommendation.

I guess I would like the “if” statement to read something like: if when going from one room to another room and their is no corresponding room number/room the door number will be associated with the initial room, and ideally I would like that door number to always have the suffix of “A” so for instance the two doors I circled in green I would like the top one to read 101A, and the bottom door circled to read 104A. and all other doors to follow that sequence of 101B, 101C ,101D etc…

This should get you started on that if statement. Confirm the value returned by the ‘toRoom’ is a null though, if it’s an empty list you would do this differently.

toRoom = null ? 
   Element.GetParameterValueByName(fromRoom,Number)+"A" : 

would you recommend editing the python script from the Get To-From Room custom node? This section in the script has the exceptions listed, but it doesn’t seem to be working because very time I have an exterior door the script fails and gives me an error. So should I add the script you have posted to this section of the python script node? Or am I mistaken?

Nope - leave the custom node alone.

Pick up by inserting the code block here:

Please excuse the build quality - this comes from the Dynamo Etch-A-Sketch integration:

I still seem to be getting errors… its says "Warning:Element.GetParameterValueByName expects argument type(s) (Element, string), but was called with (null, Revit.Elements.Room).