QueryBranch.Item method

AutoCAD Map 3D ActiveX

QueryBranch.Item method

Returns a sub-branch or query leaf from a branch.

Item(NumObject As Long) As QueryBranch

Returns the specified branch or leaf.

NumObject

Index of a sub-branch or leaf in a branch, starting at 0.

The following example builds on sample code for querying objects. For more information, click . Add the following code to the example after qry.Define.This example uses two for loops to get all the branches and leaves and print their types.

' Define query before running this code

For i = 0 To mainqrybr.Count - 1

Debug.Print mainqrybr.Type 

Debug.Print mainqrybr.Item(i).Type 

Next i

For i = 0 To andqrybr.Count - 1

Debug.Print andqrybr.Type 

Debug.Print andqrybr.Item(i).Type 

Next i