I am creating a script to number the doors based on the room number they are opening into. I’m trying to figure out a way to handle when more than one door opens into a room. I would like to name them with a suffix added on, so A, B, C, etc. Some stuff I’ve seen online do a fairly complicated way of grabbing the room center and rotating around clockwise. I’m looking to make it a little simpler, since I’m new to this. Is there a way to get all duplicated numbers, then add a suffix to those? So get all duplicates in my door number list, and for each set of duplicates, say A07, add a suffix. If there are three A07 doors, add an A, B, C to the ends, so they are A07A, A07B, A07C? I know it might appear to be a random sequence, but it’s better than having duplicates.
3 posts were split to a new topic: Add Suffix with boolean to determine the index
Is there a way to create this list to keep adding alphabets? (…X,Y,Z,AA,AB,AC)?
I’m using this to suffix room numbers, but I have more than 26 rooms sharing a number and it makes my suffixed list shorter than my element list. Its a rare use-case I know, but it will help bullet proof my script.
Wow, that was amazingly simple. I feel kind of stupid for not searching my nodes for something like that. THANKS!
Hi Jostein,
I know I’m very late to this topic, but could you post a picture of the full code?
I’ve been trying to get this to work for a while and can’t seem to get my head around it.
I’m very new to dynamo, so it would be of great help.
Cheers
Can anyone tell me what I am doing wrong, please. The Dynamo seems to renumber the doors with the suffix but it is not correcting it into REVIT. Any help would be much appreciated.
Thanks
@jostein_olsen found this reply just recently and is VERY close to what I’m trying to do so I thought you might be willing to help out on yet another variation on door numbering.
My issue is slightly different in that our Quality group wants the first door of any room (index 0) to simply BE the room number with no suffix at all. And then, any subsequent openings (index 1 and on) should follow an alphabetical suffixing A, B, C, etc. I’ve been staring at the problem just a little too long now and am sure I’m missing something simple.
Room 101 (1 door):
101
Room 102 (3 doors):
102
102A
102B
@christian.stan thank you! As I said, just had been staring at the Dynamo canvas for a little too long. Only extra thing I had to add to my graph was a List.Cycle in order to best match your example of having the actual room number formatted in the list structure I needed. Works like a charm! Cheers.