RangeTable.Remove method

AutoCAD Map 3D ActiveX

RangeTable.Remove method

Removes a range from the range table.

Remove(Index As Long) As Boolean

Returns True on success.

Index

The index, starting at 0, of a range in the range table.

The following example is a procedure that you call from the sample code for altering queried objects. To go to the sample code, click . The procedure traverses the collection of RangeTables looking for a table that contains the range that specifies the "MARSH" return value, and removes it. Add a call to rmrng just before the call to qry.Define in the sample code.

rmrng prj, rngtb

 

'Define Query

boolVal = qry.Define(mainqrybr)

.

.

.

Sub rmrng(prj As Project, rngtb As RangeTable)

Dim i As Integer

Dim rng As Range

 

For i = 0 To prj.RangeTables.Count - 1

For Each rng In prj.RangeTables.Item(i) 

If rng.ReturnValue = "MARSH" Then 

prj.RangeTables.Remove (i) 

End If 

Next 

Next i

 

End Sub