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


ITopologyExtension.ErrorSymbol Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (EditorExt)  

ITopologyExtension.ErrorSymbol Property

Symbol used to draw topology errors.

[Visual Basic .NET]
Public Function get_ErrorSymbol ( _
    ByVal geomType As esriGeometryType _
) As ISymbol
[Visual Basic .NET]
Public Sub set_ErrorSymbol ( _
    ByVal geomType As esriGeometryType, _
    ByVal Symbol As ISymbol _
)
[C#]
public ISymbol get_ErrorSymbol (
    esriGeometryType geomType
);
[C#]
public void set_ErrorSymbol (
    esriGeometryType geomType,
    ISymbol Symbol
);

Product Availability

Available with ArcGIS Desktop.

Remarks

Use this property to control the display behavior for selected point, polyline, and polygon topology errors.  Each topology error geometry type has its own symbol; specify the geometry for the symbol you want to access. The options are esriGeometryPoint, esriGeometryPolyline, and esriGeometryPolygon

[C#]

The following code retrieves the topology error symbol for polyline features and changes its color.

public void ChangeSelectedLineErrorSymbolColor()
{
  UID extUid=new UIDClass();
  extUid.Value="esriEditorExt.TopologyExtension";

  //You can get app from ICommand :: OnCreate() hook parameter
  ITopologyExtension topologyExt=m_app.FindExtensionByCLSID(extUid) as ITopologyExtension;

  IRgbColor color=new RgbColorClass();
  color.Green=180;
  ISimpleLineSymbol symbol=topologyExt.get_ErrorSymbol(esriGeometryType.esriGeometryPolyline) as ISimpleLineSymbol;
  symbol.Color=color;
  topologyExt.set_ErrorSymbol(esriGeometryType.esriGeometryPolyline,(ISymbol)symbol);
}

 

[Visual Basic .NET]

The following code retrieves the topology error symbol for polyline features and changes its color.

  Public Sub ChangeSelectedLineErrorSymbolColor()
    Dim extUid As UID=New UIDClass()
    extUid.Value="esriEditorExt.TopologyExtension"

    'You can get app from ICommand :: OnCreate() hook parameter
    Dim topologyExt As ITopologyExtension=TryCast(app.FindExtensionByCLSID(extUid), ITopologyExtension)

    Dim color As IRgbColor=New RgbColorClass()
    color.Green=180
    Dim symbol As ISimpleLineSymbol=TryCast(topologyExt.ErrorSymbol(esriGeometryType.esriGeometryPolyline), ISimpleLineSymbol)
    symbol.Color=color
    topologyExt.ErrorSymbol(esriGeometryType.esriGeometryPolyline)=TryCast(symbol, ISymbol)
  End Sub

See Also

ITopologyExtension Interface