RangeTable collection

AutoCAD Map 3D ActiveX

RangeTable collection

A collection of ranges.

Contained by the RangeTables collection of a project.

Created by RangeTables.Add followed by calls to RangeTable.Add as needed to build the collection.

Range tables allow conditional property alterations�for example, an alteration that colors an object green if its width is less than 1, or colors it blue otherwise. To specify a conditional alteration, first define a range table by building a RangeTable collection, and then use a range table expression instead of an explicit value or expression when you set the Value parameter of a property alteration (or the TextValue parameter of a text alteration, or the Pattern property of a Hatch alteration).

For more information, click . Also, go to "Using AutoCAD Map > Queries > Altering the Properties of Queried Objects > Creating a Range Table" in AutoCAD Map UI Help.

This example is based on the sample code for altering queried objects.To go to the sample code, click . The following example shows how to set up a range table called safewater. The query using the range table moves water bodies less than 10 feet from the WATER layer to the STREAM layer.

Dim rngtb As RangeTable

Dim rng As Range

Dim altlLay As AlterLine

 

'Alter Layer Based on Range Table

prj.RangeTables.Remove ("foulwater")

Set rngtb = prj.RangeTables.Add("safewater", "shallow water")

Set rng = rngtb.Add("10", "STREAM", kRangeLT)

Set altlLay = prj.CurrQuery.AlterProp.Add( _

kAlterationLayer, _ 

"(Range :AVG_DEPTH@WATER_BODIES safewater)")