How to change scale of view if view doesn't fit on a sheet

Hello everyone,

I have been trying to figure out a way to change the size of a view in case the view doesn’t fit the drawing sheet I’m creating.
I’m creating an A2 drawing sheet to put a created view from a model, and I want to make the size of the view adequate in a way that the view fits inside of the sheet.
I thought about checking the BoundingBox sizes and see if the view BoundingBox is bigger than the sheet BoundingBox.
If that is indeed the case, I was thinking about changing the size of it either through increasing the scale or changing the MinPoint or MaxPoint values.

Is this possible? And, if possible, are there easier ways of achieving this objective?

Try this:

  1. Enable the view crop
  2. Get the extents of said crop and pull the bounding box
  3. Querry the X and Y values of the bounding box.
  4. Compare the XY values to the limits of the placement space to build a ratio (remember you’ll likely want some white space, so I’d hard code these numbers rathe then pulling from the properties of the TB)
    ie: viewX/placementX and viewY/placementY
  5. PUll the smaller ratio as this is the limiting factor
  6. Multiply the view scale by the smaller ratio, and set as a custom scale value or get the next size down in your list of available view scales.
  7. Set the view scale and place on sheet

How did you set the scale of the view? I’m getting the error “Parameter is read-only” when feeding in the parameter name “View Scale 1:”.

Thanks