void nsp::zoomExtents() { //acedCommand(RTSTR, "_ZOOM", RTSTR, "_E",RTNONE); //上一行为命令方式实现Zoom Extents AcDbViewTableRecord view; acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE); AcGePoint3d max =acdbHostApplicationServices()->workingDatabase()->extmax(); AcGePoint3d min = acdbHostApplicationServices()->workingDatabase()->extmin(); AcGePoint2d max_2d (max[X], max[Y]); AcGePoint2d min_2d (min[X], min[Y]); // now set the view centre 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); } zoom e 我也不知道怎么准确描述 |