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


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

IRepresentationRuleInit Interface

Provides access to members that initialize a representation rule.

Product Availability

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

When To Use

Use IRepresentationRuleInit interface to convert a standard ArcGIS symbol to a basic symbol that can be used by a representation rule object to representation features in a representation class.

Members

Description
Method InitWithSymbol Initializes the representation rule with a symbol.

CoClasses that implement IRepresentationRuleInit

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

Remarks

Use this piece of code to create and initilize a regular ArcGIS symbol to a RepresentationRule object.

Public Sub RepRuleInit()
      Dim pRepresentationRules As IRepresentationRules
      Dim pDiamond As ISimpleMarkerSymbol
      Dim pRepresentationRule As IRepresentationRule
      Dim pRepRuleInit As IRepresentationRuleInit
      Dim lDiamondID As Long
      
      'Create new RepresentationRules for this Representation Class
      Set pRepresentationRules=New RepresentationRules
      
      'Create new Simple Marker Symbol (diamond)
      Set pDiamond=New SimpleMarkerSymbol
      pDiamond.Style=esriSMSDiamond
      pDiamond.size=4
      
      'Create a new RepresentationRule using a SimpleMarkerSymbol object that implements ISymbol interface and add to Collection
      Set pRepresentationRule=New RepresentationRule
      Set pRepRuleInit=pRepresentationRule
      pRepRuleInit.InitWithSymbol pDiamond
      'Initializes with standard ArcGIS symbols
      lDiamondID=pRepresentationRules.Add(pRepresentationRule)
      pRepresentationRules.Name(lDiamondID)="diamond"
End Sub