I have imported a list of values from Excel. Each item describes a room and includes a quantity needed. I will be creating Revit geometry from these items, but the quantities vary quite a bit with some quantities being large, like one of them is 100 for example. So what I want to do is “wrap” the list when it exceeds a given quantity (I am using 10 right now). So in the case of the quantity 100, I want to convert this to 10 items or 10 each instead. I have another that is 15, and one that is 12. So those would be an item of 10, then another of 5, for example.
I was able to repeat the items by their quantities, but I am struggling to split the long quantities into repeat items as I described. Here is an image that I hope clarifies:
Looking at the graph, I feel like I am close, but I am just stuck on how to change the quantities to reflect the duplicates I made. In other words, the first few nodes divide the quantity items, and if then do a ceiling to determine if I need more than one copy of that item. So the 15 quantity yields 2 as an example. (15 divided by 10, would require a row of 10 and a row of 5, so two rows total). I was then able to use List.OfRepeatedItem to make the duplicates in the list. This all works fine, but the quantity still reads 15 for both of these entries. For the rest of the graph downstream, I want it to read quantity 10 for the first entry and quantity 5 for the second. Then later for the 100 quantity, I want them all to say 10 and so on. Does this make sense?
Any assistance is appreciated.