A rectangle boundary.
Created by the MapUtil.NewWindow method.
For information about modifying queries, click
The following example uses WindowBound to create the main branch of a query of all objects within the extents of the attached drawing.
Dim amap As AcadMap
Dim prj As Project
Dim qry As Query
Dim atdr As AttachedDrawing
Dim mainqrybr As QueryBranch
Dim qrylf As QueryLeaf
Dim mapu As MapUtil
Dim wind As WindowBound
Dim dblary As Variant
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set prj = amap.Projects(ThisDrawing)
Set qry = prj.CurrQuery
qry.Clear
Set atdr = prj.DrawingSet.Add("MAPTUT:\\citymap7.dwg")
Set mainqrybr = qry.QueryBranch
Set qrylf = mainqrybr.Add(kLocationCondition, kOperatorAnd)
dblary = prj.DrawingSet.Item("MAPTUT:\\citymap7.dwg").Extents
Set mapu = prj.MapUtil
Set wind = mapu.NewWindow( _
mapu.NewPoint3d(dblary(0), dblary(1), 0), _
mapu.NewPoint3d(dblary(2), dblary(3), 0))
qrylf.SetLocationCond kLocationInside, wind