How to place a view in the center of a sheet

Hey All,

I am looking for a way to place a View in the center of a sheet with Dynamo. I have an add-in that creates sheets from Scope boxes, creates views from those scope boxes and then places the views it creates in those sheets. I am struggling to find a way to center those views in those sheets though. I have found a couple posts on issues similar to this but none of those resolutions seem to have worked. Any feedback on this would be greatly appreciated.

What have you tried so far? Where are you getting stuck?

1 Like

This is what I am trying currently. I have also tried the solution proposed at this link (https://www.revit.com.au/practical-dynamo-moving-views-on-sheets) to no avail. My current attempt appears to be doing nothing. I was attempting to find the center of the sheet and then move the view to the center of the sheet but I appear to be missing something.

1 Like

Can you show the node previews? We can’t tell what’s happening if we can’t see. Does the SheetView actually return a bounding box?

Interestingly enough, ViewSheets do return a bounding box, although it will always have a min of (-100, -100, -1000) and a max of (100, 100, -0.1) regardless of the titleblock size, as far as I can tell from my limited testing.

I think you are hitting on the point though that you don’t want the centroid of the viewsheet’s BoundingBox, but probably rather the centroid of the titleblock’s.

If I recall correctly, the node you’re using to place sheet + view will drop the bottom left extents of both elements at the 0,0,0 point. In a relocate workflow you’ll want the centroid of the viewport as well as the centroid of the workable paperspace from the titleblock family to get that centered look.

Our inhouse workflow for this is pretty sloppy:


What tripped us up that we never doubled back to address (as you can guess from the screenshot above) is how to compensate for offsets due to the size of the actual titleblock on the sheet, since we pull in the main consultant’s titleblock family.

If you’re using your own titleblocks this might be as simple as a dictionary based on your standard printing sizes.

Exactly what I was getting at. You would get the bounding box of the titleblock, find its center, and then locate the view at the center of the TB rather than the sheet. It does mean that you have to be extra careful not to have anything (text boxes) extending beyond the limits of your TB.

Is there an easy way to find the center of a title block? I am struggling to find a way to do that.

Again, what have you tried? Do you have the TB of the sheet? That’s the first step. Once you have the TB you can get the center from the bounding box, most likely using the min and max points.

This is what I am trying currently.

This is what I get. It’s weird. It seems like it centers the title of the scope box/view at the bottom but the actual view seems to not get centered.

1 Like

You’ll need to get the boundingbox of the specific TB on the sheet. Sheets have coordinates just like any other view, so it’s possible for a TB to not be located at the view’s origin.

I honestly forget if views get placed at their center or bottom-left corner. If you don’t have Revit Previews turned on it’s probably a good check for your coordinates. Make sure the min and max point of your boundingbox matches the bounds of your TB. Also try placing a view at (0,0) to see if it’s centered or offset to the corner. Then you’ll know if you have to account for centering or not.

When I place the view at 0,0 it sticks it here. It seems I will need to adjust the center point that I was using to account for this.

I think I got it. This appears to be working.


1 Like

Viewports get placed by their center. I use Viewport.Create from the Rhythm package, then I use Element.MoveByVector to move it to the center. this works more reliably in my experience when doing a lot of sheets at the same time.

Hi @timhevel ,
Can you show us the map? Actually I’m finding it hard to understand how Element.MoveByVector node will work

To get to what you are trying to achieve, you will need to do some manual measuring of your sheet to see the available paper space left over when you deduct the width of the information panel of your sheet.
The issue here is that most firms have unique sheet designs, and so you must find the centre of yours. Afterwards, use the point.bycoordinates node to plot that centre point and use it to place your view. This should work perfectly if you have a standardized sheet template.

you need to create a vector.bytwopoints with 0,0,0 as your start point and the middle of your sheet as the endpoint. then input the created vector into the Element.MoveByVector node.