Zooming object in until border with scripting

Hi there,

I am using ViewCaptureToFile to export a view of an object.
I am trying to zoom in until the mesh border reaches the edge of the export file (.png)

I am using the following code

rs.Command('_SetView _World _Bottom')
rs.RotateView(direction=0, angle=90.0)  # right turn
rs.ZoomExtents()

any idea? :slight_smile:

Thank you!
Hans Paul

Hi Hans Paul - I think you’ll need to use SetZoomExtentsBorder and set that to 1 for parallel views - does that do it?

-Pascal

Hello Pascal,
this is what I get.

New%20requirement%20fix

any ideas on how to make it work?

That is correct, now useZoom Extents in a parallel view. Does that do what you want?

-Pascal

I’ve tried but that still does not work.

I think this is sorted out and working now ( via PM )- correct?

-Pascal

Yes it works perfectly.
Thanks