hi, i need to create rooms from a programing excel file, so i created a graph as you can see below, but there is a column in there that defines how many time this room has to be created, ( some rooms like storage areas need to be created multiple times)
how can i implement that in my graph? please and thank you!
List.GetItemAtIndex and List.OfRepeatedItems will do the trick. I recommend building the numbers sequentially instead of from Excel as well (prevents duplicate numbers).
That said I HATE using count fields in room schedules. They never won’t up the same anyway so it is just a matter of time before you need the descrete data, and so I prefer having the person tying you into excel duplicate the row instead.
Yeah - the methods I outlined above will work for that. Some more detail here for you
List.GetItemAtIndex for the count data from each row presented by the List.RestOfItems.
List.OfRepeatedItems to duplicate the item (each sublist from the List.RestOfItems node) by the count from step 1.
List.Flatten set to @L2 to remove the extra data structure. You should now have a number of sub lists equal to the total number of rooms to add (the sum of the count column in excel).
These get wired into your current List.GetItemAtIndex node.
As noted before you need to decide how to build the room numbers as this will result in duplicate values for that parameter. The numbering strategy you decide will inform the best way to do that, though again this may be better suited in excel (another advantage of single rows) or the designer can manually adjust the values in Revit (the excel data is no longer used anyway) or you likely need a sub-step to build a suffix to append to the room number between steps 2 and 3.
Can you post this .dyn and excel file, or export the canvas as an image after pinning open the data previews and running the graph? That type of stuff makes it a lot easier to help out solving issues. Otherwise to help people have to build the dataset, look at your image and rebuild it, and then start working on the solution.
@Arsham What is your plan for placing the rooms in the correct locations within the model? Does the model have any reference elements or coordinates to guide the placement?
This is programing stage, so the client will give us the Excel file with preferred square footage and quantity of rooms, we’ll create them as unplaced, then after schematic design, we’ll manually place these rooms and compare with actual square footage…. For now they are just going to be created.unplaced if that makes sense, just to show up in schedule
Good to train users that deleted from view = return to unplaced/briefed vs making new rooms. Only takes one user to mess it up but its how revit intends for this process to work for sure.
Based on your Dynamo version I am assuming these are for Revit 2024. Looks like you are missing a few updates (including about 5 important security ones) if so, might be worth looking into getting things patched up if my guess is right.
it is 2024, but i had to redo it from my own laptop at home which is the older version, since with my work account, as im new, i couldn’t upload files here, but everything is up to date here in the office version. thanks again!