视口缩放
<P> acedCommand(RTSTR, "Zoom", RTSTR, "Window", RTPOINT, dZoomMin,<BR> RTPOINT, dZoomMax, RTNONE);</P><P>上面是我用command命令实现的视口缩放的功能,</P>
<P>请问如果不用command命令,该怎么做呢?</P>
<P>寻求帮助,谢谢!!!</P>
reply
<P>应该发在arx版块:</P><P>void zoomWindow(AcGePoint3d &min, AcGePoint3d &max)<BR>{<BR> // get the extents of the drawing<BR> AcDbViewTableRecord view;</P>
<P> AcGePoint2d max_2d (max, max);<BR> AcGePoint2d min_2d (min, min);<BR> // now set the view center point<BR> view.setCenterPoint(min_2d + (max_2d - min_2d) / 2.0);<BR> // now height and width of view<BR> view.setHeight(max_2d - min_2d);<BR> view.setWidth(max_2d - min_2d);<BR> // set the view<BR> acedSetCurrentView(&view, NULL);<BR> // update the extents<BR> acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE);<BR>}</P>
页:
[1]