就两个属性:
Extmin and Extmax - Returns the extents of Model space.
Pextmin and Pextmax - Returns the extents of the current Paper space layout.
下面是例子
C#
[CommandMethod("ZoomExtents")]
static public void ZoomExtents()
{
// Zoom to the extents of the current space
Zoom(new Point3d(), new Point3d(), new Point3d(), 1.01075);
}
[CommandMethod("ZoomLimits")]
static public void ZoomLimits()
{
Document acDoc = Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
// Zoom to the limits of Model space
Zoom(new Point3d(acCurDb.Limmin.X, acCurDb.Limmin.Y, 0), new Point3d (acCurDb.Limmax.X , acCurDb.Limmax.Y,0), new Point3d(), 1);
}