QueryReport.Clear method

AutoCAD Map 3D ActiveX

QueryReport.Clear method

Removes all expressions from the template.

Clear As Boolean

Returns True on success.

The following example removes all expressions from a template.

Dim amap As AcadMap

Dim prj As Project

Dim atdr As AttachedDrawing

Dim qry As Query

Dim qrybr As QueryBranch

Dim qrylf As QueryLeaf

Dim qryrp As QueryReport

 

Set amap = ThisDrawing.Application. _

GetInterfaceObject("AutoCADMap.Application") 

Set prj = amap.Projects(ThisDrawing)

Set atdr = prj.DrawingSet.Add("MAPTUT:\\citymap7.dwg")

Set qry = prj.CurrQuery

qry.Clear

Set qrybr = qry.QueryBranch

Set qrylf = qrybr.Add(kLocationCondition, kOperatorAnd)

qrylf.SetLocationCond kLocationInside, prj.MapUtil.NewLocationAll

Set qryrp = prj.CurrQuery.Report

qryrp.Clear