This document is archived and information here might be outdated.  Recommended version.


IRepresentationRule Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Display)  

IRepresentationRule Interface

Provides access to members that control a representation rule.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

Use IRepresentationRule interface to get reference to the individual representation rule objects present in the RepresentationRules collection for a representation class.

Members

Description
Method Draw Draws a layer of a representation rule. If index is -1, all layers are drawn.
Method InsertLayer Adds a layer to the representation rule.
Read-only property Layer Layer at a given index.
Read-only property LayerCount Number of layers in the representation rule.
Method RemoveLayer Removes a layer from the representation rule.

CoClasses that implement IRepresentationRule

CoClasses and Classes Description
RepresentationRule An object defining a representation rule.

Remarks

IRepresentationRule interface provides access to the members of a single representation rule used by a representation class to draw the individual feature representations. A representation rule consists of one or more basic symbol layers namely BasicLineSymbol, BasicFillSymbol and BasicMarkerSymbol. In addition to the symbol layers, a representation rule may also contain geometric effects.

The following code snippet shows how to get access to a RepresentationRule object given with its name. The name of the representation rule can be changed to get access to a different representation rule.

  Dim pRepRules As IRepresentationRules
Dim pRepRule As IRepresentationRule
Dim lID As Long, sName As String
Set pRepRules=pRepClass.RepresentationRules
'walk through the representationrules and get a specific rule with given name
pRepRules.Reset
pRepRules.Next lID, pRepRule
Do Until pRepRule Is Nothing
If pRepRules.Name(lID)="Buildings_Rule" Then Exit Do
pRepRules.Next lID, pRepRule
Loop

See Also

IRepresentationRules Interface

.NET Related Topics

Cartographic representations