Message 1 of 2
ZoomToWindow doesn't scale?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
acedCommandS(RTSTR, _T("ZOOM"), RTSTR, _T("_W"), RTPOINT, asDblArray(ptMin), RTPOINT, asDblArray(ptMax), RTNONE);
static void ZoomToWindow(const AcGePoint3d& ptMin, const AcGePoint3d& ptMax, double scale)
{
acdbUcs2Wcs(asDblArray(ptMin), asDblArray(ptMin), false);
acdbUcs2Wcs(asDblArray(ptMax), asDblArray(ptMax), false);
AcDbViewTableRecord view;
view.setCenterPoint(AcGePoint2d((ptMax.x + ptMin.x) / 2, (ptMin.y + ptMax.y) / 2));
view.setHeight(fabs(ptMin.y - ptMax.y) * scale);
view.setWidth(fabs(ptMin.x - ptMax.y) * scale);
AcGePoint3d origin(0, 0, 0);
AcGeVector3d xAxis(1, 0, 0);
AcGeVector3d yAxis(0, 1, 0);
AcGeMatrix3d mat;
acedGetCurrentUCS(mat);
origin.transformBy(mat);
xAxis.transformBy(mat);
yAxis.transformBy(mat);
view.setUcs(origin, xAxis, yAxis);
Acad::ErrorStatus es = acedSetCurrentView(&view, NULL);
acdbHostApplicationServices()->workingDatabase()->updateExt(TRUE);
}
ZoomToWindow doesn't scale?
Can the function of acedDmmandS be implemented?