Adds a property alteration to the property alteration definition.
Add( AlterType As EAlterationType, _
Expression As String _
) As LPDISPATCH
Returns an AlterLine, HatchDef, or TextDef, depending on AlterType.
AlterType
Expression
You can call this method to add a hatch or text alteration to the collection by passing the KAlterationHatch or kAlterationTextEntity constants in the first argument, as shown in the example. The API then uses the default hatch or text entity definitions. To use other definitions, call the AddHatchDef and AddTextDef methods instead of this method.
The following excerpt from a larger example defines a query that alters the color of drawing objects and adds a text entity, the name, to water bodies on the map. For the complete example, click .
Dim qry As Query
Dim altls As AlterLines
Dim altl As AlterLine
Dim txtdf As TextDef
' Create a query -- code not shown
Set altls = qry.AlterProp
altls.RemoveAll
Set altl = altls.Add(kAlterationColor, "RED")
Set txtdf = altls.Add( _
kAlterationTextEntity, _
":NAME@WATER_BODIES")
qry.AlterTag = True
' Define and execute the query to alter properties -- code not shown