in AutoCAD, you use the Window option of the ZOOM command to define the area of the drawing that should be displayed in the drawing window. When you define the area to be displayed, the Width and Height properties of the current view are adjusted to match the area defined by the two points specified. Based on the specified points, the CenterPoint property of the view is also moved.
This example code demonstrates how to zoom to a defined area using the Zoom procedure defined under . The Zoom procedure is passed the coordinates (1.3,7.8,0) and (13.7,-2.6,0) for the first two arguments to define the area to display.
No new center point is needed, so a new Point3d object is passed to the procedure. The last argument is used to scale the new view. Scaling the view can be used to create a gap between the area displayed and the edge of the drawing window.
Public Sub ZoomWindow()
'' Zoom to a window boundary defined by 1.3,7.8 and 13.7,-2.6
Dim pMin As Point3d = New Point3d(1.3, 7.8, 0)
Dim pMax As Point3d = New Point3d(13.7, -2.6, 0)
Zoom(pMin, pMax, New Point3d(), 1)
static public void ZoomWindow()
// Zoom to a window boundary defined by 1.3,7.8 and 13.7,-2.6
Point3d pMin = new Point3d(1.3, 7.8, 0);
Point3d pMax = new Point3d(13.7, -2.6, 0);
Zoom(pMin, pMax, new Point3d(), 1);