The zoom function in the CADCamera class allows users to zoom and set ViewRect size to the given dimensions.
The CADViewer demo demonstrates this functionality. See Samples.
The following Zoom sample illustrates how you use the zoom function:
The following ZoomExtents sample illustrates how you use the zoomExtents function to zoom to certain view dimensions: