Crop Region automatically fit visible elements

i use an in house plugin to generate sheets from assemblies howevr the crop region is usually somewhere very far from the objects in all views and i have to manually resize it to fit the object and select crop view…Is there any way of autoamtically resising the crop regoin to fit vissible objects only?

1 Like

Hi @ashwinash112,

When you create an assembly, do the objects/families contain reference planes?

Some time ago i found out that the viewport size of assembly views (based on boundingbox) is heavily affected by reference planes inside the objects/families. Very strange, it would seem much more logical to me if the boundinbox would only fit the actual geometry of the objects/families.

If it is a “bug” it is probably more a Revit than a Dynamo thing.

Kind regards,
Mark

3 Likes

Hi

could it be your Sheet/Titleblock being far away from origin?

1 Like

It is possible but how do i find out??

create a new titleblock family and place i using dynamo on a sheet where your other titleblock family is already placed perhaps this new one shows up at a different place

1 Like

did you find a solution to fit the views to elements visible?

Create bounding box around the elements in focus.
Use View.SetCropBox from ootb nodes.

1 Like