Doors linked to the rooms (letters sequence)

Hello everyone!
I would like to change the parameter “Name” that my doors have. I linked the door together with the room and a sequence list for the letters.
The first step works fine, but what I really need is that for each room to start with the letter “a” and if the room has more doors the sequence continues accordingly.
“Door1: Room2_a”; “Door6: Room8_a”; “Door11: Room3_a”; “Door2: Room2_b”; “Door3: Room2_c”; “Door4: Room1_a”

Attach image

Thank you in advance

  1. Use a List.GroupByKey node where the Doors are the list and the to room values are the keys.
  2. Use the grouped lists of doors to generate the alphabetic sequence. Lacing will matter here - likely wants to be set to longest.
  3. Use a String.Join node to add the room name (the unique keys value of the group by keys node) to the alphabetic sequences.
  4. Set the grouped element lists by the grouped value lists or flatten both to set them.

Might wanna review those “(None)” values too as I doubt you want “(None)_a” as a name. A code block to replace them with another value like “exterior” is possible. Something like this perhaps, though I can’t test it right now so I may have miss typed. Input A should be your ‘to room’ value, and input B should be your ‘from room’ value, or perhaps just “Exterior” if you know all doors without a “to room” are exterior doors.
A=="(None)"? B: A;

See my post, you can use the first script from BVN package perhaps.

Thank you, but it’s still not working.
It has to detect the name of each rooms and then add the alphabetic sequence. In the list, the rooms are in a random order.

This is what I have:

  • “Door1: Room2_a”
  • “Door6: Room8_b”
  • “Door11: Room3_c”
  • “Door2: Room2_d”
  • “Door3: Room2_e”
  • “Door4: Room1_f”

This is what I want:

  • “Door1: Room2_a”
  • “Door6: Room8_a”
  • “Door11: Room3_a”
  • “Door2: Room2_b”
  • “Door3: Room2_c”
  • “Door4: Room1_a”

Did you try the steps I listed above? If so can you post a screenshot so I can see what the issue may be? If not give that a shot and post where you get stuck.

Finally it works! I changed some connection and I uploaded Revit too.

Thank you

1 Like