Placing Views on a Sheet and Creating New Sheets Once That Sheet Is Full

I built a code that would pull existing drafting views from a Revit file into a new Revit project, create a sheet, and put those drafting views onto a sheet. Each drafting view has a border and they currently come in a variation of 4 different sizes (260Wx118D, 520Wx118D, 260Wx236D, 520Wx236D). I started trying to map out the coordinates, but realize it’s not smart enough for what I need.

The other issue is currently my “Sheet Creation” node is only set up for 1 sheet to be created; I don’t even know where to begin to have Dynamo recognize a how many sheets need to be made.

I manually assembled this sample sheet to reflect what I’m looking for as a result from the code.

Hi @mcampbell6AG35 ,

To make life easier let’s say you have to place 35 drafting sheets with a height of 10.
Let’s also assume a sheet can fit up to a height of 100.

To figure out how many sheets we need we just need to do something like this:
35 * 10 / 100 = 3.5 sheets. Using Math.Ceiling you can determine it has to be 4.

To then determine how many pages you need per page you could use Math.Sum cumulative to calculate when the height would be higher than 100. (or multiples of using %).

For horizontal & vertical positioning the same workflow could be used (and probably has to be).

Here is a possible way how what I explained abovecould be done through Dynamo:

2022-05-30 Chop by cumulative length.dyn (31.6 KB)