Issue with Sheet.ByName... 3dview to large for sheet

I’ve made a script that generates 3d views, and packs them on sheets.

the script works for certain models and sheet sizes, but for others, it does not, and gives me a warning that 3d view is to large.

how to resize the 3dview in dynamo?