Adds a leaf or sub-branch to a query.
Add(QueryBranchOrLeaf As EClassID, _
JoinOp As EJoinOperator) As Object
Returns a QueryBranch or QueryLeaf object.
QueryBranchOrLeaf
JoinOp
The following EClassID values are valid QueryBranchOrLeaf arguments.
The following example adds a sub-branch to a query.
Dim amap As AcadMap
Dim prj As Project
Dim qry As Query
Dim mainqrybr As QueryBranch
Dim qrylf As QueryLeaf
Dim andqrybr As QueryBranch
Set amap = ThisDrawing.Application. _
GetInterfaceObject("AutoCADMap.Application")
Set prj = amap.Projects(ThisDrawing)
Set qry = prj.CurrQuery
qry.Clear
Set mainqrybr = qry.QueryBranch
Set qrylf = mainqrybr.Add(kLocationCondition, kOperatorAnd)
Set andqrybr = mainqrybr.Add(kQueryBranch, kOperatorAnd)