An object defining a representation rule.
RepresentationRule object is a collection of basic symbols such as BasicLineSymbol, BasicFillSymbol and BasicMarkerSymbol along with MarkerPlacement used for representing features within a representationclass. Complex symbols can be created by incorporating one or more geometric effects into your rule.
Standard ArcGIS symbols such as SimpleMarkerSymbol, SimpleLineSymbol etc implementing ISymbol interface can also be converted to a representation rule using IRepresentationRuleInit interface. When a standard ArcGIS symbol is converted to a representation rule, it may contain either one or more basic symbol layers.
The graphic attributes present for a rule can be overriden using regular attribute fields.
Use IRepresentationRule interface to manage the individual symbol layer within a rule.
Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.
|IClone (esriSystem)||Provides access to members that control cloning of objects.|
|IDocumentVersionSupportGEN (esriSystem)||Provides access to extend the IObjectStream interface with methods to hande saving objects that did not exist in previous versions of the software.|
|IDrawingOutline||Provides access to methods dealing with the outline of a drawing rule.|
|IFieldOverrides||Provides access to a collection of field overrides.|
|IGeometricEffect||Provides access to the Geometric Effect Interface.|
|IGeometricEffects||Provides access to members that control the geometric effect list.|
|IMapLevel||Provides access to members that control the map level.|
|IPersist||Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile.|
|IRepresentationRule||Provides access to members that control a representation rule.|
|IRepresentationRule2||Provides access to members that control a representation rule.|
|IRepresentationRuleInit||Provides access to members that initialize a representation rule.|
|ISupportErrorInfo||Indicates whether a specific interface can return Automation error objects.|
|IXMLSerialize (esriSystem)||Provides access to members that XML serialize and deserialize an object to/from XML.|
|IXMLVersionSupport (esriSystem)||Provides access to members that help in serializing an object to different namespaces (versions).|
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 pRules As IRepresentationRules
Dim pRule As IRepresentationRule
Dim lID As Long, sName As String
Set pRules = pRepClass.RepresentationRules
pRules.Reset 'Resets all representation rules
pRules.Next lID, pRule
Do Until pRule Is Nothing 'Loop thru rules till you find a match
sName = pRules.Name(lID)
Debug.Print "The rules name is: " & sName
If sName = "Pacific" Then 'Change name for a different rule
Exit Do 'Exit loop after a match is found
pRules.Next lID, pRule
LoopDebug.Print pRule.LayerCount 'Print symbol layer count