- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I use ZoomExtents, ZoomWindow, ZoomEntity, pretty much as described at:
http://through-the-interface.typepad.com/through_the_interface/2008/06/zooming-to-a-wi.html
I will get the Database.Extmin and Database.Extmax for the extents to feed to:
public static void ZoomWin(Editor acEd, Point3d min, Point3d max)
{
Point2d min2d = new Point2d(min.X, min.Y);
Point2d max2d = new Point2d(max.X, max.Y);
ViewTableRecord view = new ViewTableRecord();
Point3d vcen = MidpointPtPt(min2d, max2d);
view.CenterPoint = new Point2d(vcen.X, vcen.Y);
//view.CenterPoint = min2d + ((max2d - min2d) / 2.0);
view.Height = max2d.Y - min2d.Y;
view.Width = max2d.X - min2d.X;
acEd.Regen();
acEd.SetCurrentView(view);
}
What I have found is that often, about every other time, it 'blacks out'. I can then Set Next Statement back to the acEd.Regen(), then step on through and it will then show everything. I have tried it with and without the Regen, but either way the results is the same.
While it is annoying, it isn't major, but if someone has an answer, I would appreciate it.
By the way, I have tried other methods for the Zoom Extents, and actually get the same results, half or so of the time it blacks out.
Solved! Go to Solution.
