Message 1 of 10
zoom WIndow .NET
Not applicable
02-20-2008
01:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using VS2005 and AutoCAD 07/08 and SQL Server 2000
Hopefully maybe a stupid question but i guess we'll see....Why doesnt this work??????
MORE CODE ABOVE HERE..........................
Dim Xmax As Decimal
Dim Xmin As Decimal
Dim Ymax As Decimal
Dim Ymin As Decimal
Xmax = (MyEnt.GeometricExtents.MaxPoint.X + 1)
Xmin = (MyEnt.GeometricExtents.MinPoint.X - 1)
Ymax = (MyEnt.GeometricExtents.MaxPoint.Y + 1)
Ymin = (MyEnt.GeometricExtents.MinPoint.Y - 1)
'Dim zoomRec As New DatabaseServices.ViewTableRecord
'Dim ZoomHelp As (Autodesk.AutoCAD.Runtime.Interop)MyDWG
Dim zoomwindow As New Autodesk.AutoCAD.GraphicsSystem.View
Dim lowerbounds As New Geometry.Point2d(Xmin, Ymin)
Dim UpperBounds As New Geometry.Point2d(Xmax, Ymax)
zoomwindow.ZoomWindow(lowerbounds, UpperBounds)
MORE CODE bELOW HERE..........................
What i am doing is selecting labels that are mtext. That is where the coordinates come from. I am trying to zoom to each one in a for next statement. It wont zoom to the window though. There are no errors thrown. Through out the Whole code. Just cant get it to zoom to the entity. I did look through the posts on here and they mention "interop" I dont know what that is and have never used it.
I
Hopefully maybe a stupid question but i guess we'll see....Why doesnt this work??????
MORE CODE ABOVE HERE..........................
Dim Xmax As Decimal
Dim Xmin As Decimal
Dim Ymax As Decimal
Dim Ymin As Decimal
Xmax = (MyEnt.GeometricExtents.MaxPoint.X + 1)
Xmin = (MyEnt.GeometricExtents.MinPoint.X - 1)
Ymax = (MyEnt.GeometricExtents.MaxPoint.Y + 1)
Ymin = (MyEnt.GeometricExtents.MinPoint.Y - 1)
'Dim zoomRec As New DatabaseServices.ViewTableRecord
'Dim ZoomHelp As (Autodesk.AutoCAD.Runtime.Interop)MyDWG
Dim zoomwindow As New Autodesk.AutoCAD.GraphicsSystem.View
Dim lowerbounds As New Geometry.Point2d(Xmin, Ymin)
Dim UpperBounds As New Geometry.Point2d(Xmax, Ymax)
zoomwindow.ZoomWindow(lowerbounds, UpperBounds)
MORE CODE bELOW HERE..........................
What i am doing is selecting labels that are mtext. That is where the coordinates come from. I am trying to zoom to each one in a for next statement. It wont zoom to the window though. There are no errors thrown. Through out the Whole code. Just cant get it to zoom to the entity. I did look through the posts on here and they mention "interop" I dont know what that is and have never used it.
I