Viewport location for multiple sheet issue

Hi friends,

I am trying to work through an issue with my Dynamo graph that I am hoping I can get some additional direction on. I have a node group that creates a series of Scope Boxes, a series of plan views, assigns the scope boxes to the views, then creates and places the plan view on a sheet. 1 scope box to 1 plan to 1 sheet.

Something in my viewport coordinates is not adjusting to reflect the new view boundary created by the scope boxes. In the example below, I have 3 plans to place on 3 sheets. The view places on the sheet, and the view title actually is placed correctly. But the views themselves retain their position defined by the scope box:

Here is my node group that creates the plan views and associates the scope boxes:

And here is my sheet creation:

I started by using the Rhythm Viewport.Create node with the exact coordinates, that wasn’t working, so I tried adding John’s Viewport.SetBoxCenter which achieves the same result.

My question is, where is are viewport coordinates derived from and what do I need to modify to control view placement with View Titles?

Reading through an old post of Jeremy Tammik on his Building Coder blog helped me understand a little more the viewport coordinate logic in the Revit API:

There is a more elegant way to do this, but with the time constraints I am dealing with I have found a work around that fixes the issue in my graph/custom nodes. Greg McDowell has an old post from 2016 that looks at removing scope boxes from views.

By applying this python script to the views, I can remove the scope box from the view. I then extract the bounding box from the previously assigned scope box and use MEPover’s view.setcropboxcurves to redefine the crop region. Once the crop region is redefined, I need to reassign the scope box. But before I do that I have to reset the crop region as detailed here.

This solution must be run after the views are created and before they are placed on sheets.