ArcObjects Library Reference (GeoDatabase)  

IRepresentation Interface

Provides access to members that return and set properties of a representation.

Product Availability

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

Members

Description
Read-only property Feature The feature associated with this representation.
Read/write property Graphics The Graphics object that describes the free representation.
Read-only property HasShapeOverride Indicates if the shape is overriden.
Read-only property MapContext Map context in which the representation is defined.
Method RemoveShapeOverride Removes the shape override.
Read-only property RepresentationClass The representation class to which this representation belongs.
Read/write property RuleID Rule ID.
Read/write property Shape Representation geometry.
Read-only property ShapeCopy Copy of the representation geometry.
Read-only property ShapeEdit Representation geometry. This geometry can be a copy of the shape if the shape override option is active.
Method UpdateFeature Updates the feature fields with the information contained in the representation.
Read/write property Value The value of a representation property.

CoClasses that implement IRepresentation

CoClasses and Classes Description
Representation A Feature Representation object.

Remarks

A feature representation is a feature enabled with representation capabilities. There are 3 different ways to create representations:

  1. Based on a Representation Rule (RuleID) 
  2. Based on Overrides
  3. As free representation which is a graphic

Use IRepresentation interface to get a reference to the feature representation and modify its attributes.

RepresentationClass property can be used to get a reference to the feature class representation which the representation belongs to.

RuleID property is used to get or set the value for the representation rule present in the RuleID field which is then used to symbolize the feature representations. All representations converted to free representations will have the value of RuleID equal to -1.

How to convert a feature representation into a free representation which uses representation graphics for drawing:

  1. Create a new RepresentationGraphics object. Use esriDisplay.IRepresentationGraphics interface for this.
  2. Set this representation graphics object to the feature representation using Graphics property. This process will assign a value of -1 to the RuleID property which is significant to a free representation.
  3. Update the feature representation using UpdateFeature.
  4. Store the changes using IFeature::Store method.

Shape property returns a reference to the shape of the feature representation as geographic geometry. Use IMapContext::FromGeographyToMap method to convert geographic geometry to map context geometry.

Use ShapeEdit property to make edits to the shape, for example, to create a shape override. This property uses a copy of the shape object so, editing will not cause any change to the actual feature's shape but will do so in the copied object.

ShapeCopy is the property which creates a clone of the shape object. If you do not wish to use the clone then use ShapeEdit instead of this property.

UpdateFeature method must be called after a feature representation's attributes have been altered. In order to store the changes into the feature, IFeature::Store method must be used.