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”
Use a List.GroupByKey node where the Doors are the list and the to room values are the keys.
Use the grouped lists of doors to generate the alphabetic sequence. Lacing will matter here - likely wants to be set to longest.
Use a String.Join node to add the room name (the unique keys value of the group by keys node) to the alphabetic sequences.
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;
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.
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.