2012년 3월 9일 금요일

Zoom

Zoom to an area defined by two points
[CommandMethod("ZoomWindow")]
static public void ZoomWindow()
{
  // Zoom to a window boundary defined by 1.3,7.8 and 13.7,-2.6
  Point3d pMin = new Point3d(1.3, 7.8, 0);
  Point3d pMax = new Point3d(13.7, -2.6, 0);

  Zoom(pMin, pMax, new Point3d(), 1);
}
두 인자에 대한 좌표 (1.3,7.8,0)와이 (13.7, -2.6,0)을 표시하는 영역을 정의하기 위해 전달됩니다.

Zoom in on the active drawing using a specified scale
[CommandMethod("ZoomScale")]

static public void ZoomScale()
{
  // Get the current document
  Document acDoc = Application.DocumentManager.MdiActiveDocument;

  // Get the current view
  using (ViewTableRecord acView = acDoc.Editor.GetCurrentView())
  {
      // Get the center of the current view
      Point3d pCenter = new Point3d(acView.CenterPoint.X,
                                    acView.CenterPoint.Y, 0);

      // Set the scale factor to use
      double dScale = 0.5;

      // Scale the view using the center of the current view
      Zoom(new Point3d(), new Point3d(), pCenter, 1 / dScale);
  }
}

ZOOM SCALE 그런건가보다.

Zoom in on the active drawing to a specified center

[CommandMethod("ZoomCenter")]
static public void ZoomCenter()
{
  // Center the view at 5,5,0
  Zoom(new Point3d(), new Point3d(), new Point3d(5, 5, 0), 1);
}


이건 ZOOM OBJECT정도

Display Drawing Extents and Limits

[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);
}
ZOOM EXTEND인듯.



출처
http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer%27s%20Guide/index.html

댓글 없음 :

댓글 쓰기