void zoomWindow(AcGePoint3d &min, AcGePoint3d &max) { // get the extents of the drawing AcDbViewTableRecord view;
AcGePoint2d max_2d (max[X], max[Y]); AcGePoint2d min_2d (min[X], min[Y]); // now set the view center point view.setCenterPoint(min_2d + (max_2d - min_2d) / 2.0); // now height and width of view view.setHeight(max_2d[Y] - min_2d[Y]); view.setWidth(max_2d[X] - min_2d[X]); // set the view acedSetCurrentView(&view, NULL); // update the extents acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE); }