Gets a specific expression from the report template.
Item(ExpNumber As Long) As Expression
Returns the line.
ExpNumber
The following example prints the values of an expressions in a template.
Dim amap As AcadMap
Dim prj As Project
Dim qry As Query
Dim qrybr As QueryBranch
Dim qrylf As QueryLeaf
Dim qryrp As QueryReport
Dim exp As Expression
Dim exp2 As Expression
Dim i As Integer
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set prj = amap.Projects(ThisDrawing)
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
Set exp = qryrp.Add(".LENGTH")
Set exp2 = qryrp.Add(".LAYER")
For i = 0 To qryrp.Count - 1
Debug.Print qryrp.Item(i).Value
Next i