- 积分
- 5172
- 明经币
- 个
- 注册时间
- 2003-4-18
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
//////////////////////////////////////////////////////////////////////////// // // This is command 'ZOOMEXT, by Fenton Webb [Apr/17/2002], DevTech, Autodesk void asdkzoomExt() { // get the extents of the drawing AcDbViewTableRecord view; AcGePoint3d max = acdbHostApplicationServices()->workingDatabase()->extmax(), 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); // updates the extents acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE); }
//////////////////////////////////////////////////////////////////////////// // // This is command 'ZOOMWIN, by Fenton Webb [Apr/17/2002], DevTech, Autodesk void asdkzoomWin() { AcGePoint3d max, min; // get the window coords int res = acedGetPoint (NULL, "\nPick zoom window pnt : ", asDblArray(min)); // if ok if (res == RTNORM) { res = acedGetCorner (asDblArray(min), "\nPick other corner : ", asDblArray(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 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); // updates the extents acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE); } }
|
评分
-
查看全部评分
|