Center Objects (.NET)

You can reposition the image in the drawing window by changing the center point of a view using the CenterPoint property. When the center point of a view is changed and the size of the view is not changed, the view is panned parallel to the screen.

Zoom in on the active drawing to a specified center

This example code demonstrates how to change the center point of the current view using the Zoom function defined under the "Manipulate the Current View" topic.

While the Zoom function is passed a total of four values, the first two values are defined as new 3D points and are ignored by the function. The third value is the point (5,5,0) to define the new center point of the view and 1 is passed in for the last value to retain the size of the current view.

C# Example

[CommandMethod("ZoomCenter")]
static public void ZoomCenter()
{
  // Center the view at 5,5,0
  Zoom(new Point3d(), new Point3d(), new Point3d(5, 5, 0), 1);
}