An enumeration of error features that match the passed in parameters.
[Visual Basic 6.0] Property ErrorFeaturesByGeometryType(
ByVal SpatialReference As ISpatialReference, _
ByVal GeometryType As esriGeometryType, _
ByVal Exceptions As Boolean _
) As IEnumTopologyErrorFeature
[Visual Basic .NET] Public Function get_ErrorFeaturesByGeometryType ( _ ByVal SpatialReference As ISpatialReference, _ ByVal GeometryType As esriGeometryType, _ ByVal Exceptions As Boolean _ ) As IEnumTopologyErrorFeature
[C#] public IEnumTopologyErrorFeature get_ErrorFeaturesByGeometryType ( ISpatialReference SpatialReference, esriGeometryType GeometryType, bool Exceptions );
[Java] public IEnumTopologyErrorFeature getErrorFeaturesByGeometryType ( ISpatialReference SpatialReference, esriGeometryType GeometryType, boolean Exceptions )
[C++] HRESULT get_ErrorFeaturesByGeometryType( ISpatialReference* SpatialReference, esriGeometryType GeometryType, VARIANT_BOOL Exceptions, IEnumTopologyErrorFeature** ErrorFeatures );
Parameters
SpatialReference [in]
SpatialReference is a parameter of type ISpatialReference
GeometryType [in]
GeometryType is a parameter of type esriGeometryType
Exceptions [in]
Exceptions is a parameter of type VARIANT_BOOL
ErrorFeatures [out, retval]
ErrorFeatures is a parameter of type IEnumTopologyErrorFeature
-2147215018 - FDO_E_INVALID_GEOMETRY_TYPE_FOR_TOPOLOGY
When an unsupported esriGeometryType is specified for the GeometryType parameter.
ErrorFeaturesByGeometryType returns an enumeration, IEnumTopologyErrorFeature of error features corresponding to the specified parameters. If no error features corresponding to the specified parameters exist, an empty enumeration is returned.
The GeometryType parameter accepts three supported esriGeometryType (constant, value):
Exceptions indicates whether Exceptions or Errors will be returned. If Exceptions is True, the enumeration will only contain Exceptions, otherwise the enumeration will contain Errors.
ErrorFeaturesByGeometryType requires the spatial reference of the Topology, this can be obtained from the IGeoDataset interface.
The following example iterates over the error features of type polyline and prints out their parentage information and shape_length to the Debug window:
Dim pErrorFeatCont As IErrorFeatureContainer
Dim pEnumTopoError As IEnumTopologyErrorFeature
Dim pTopoError As ITopologyErrorFeature
Dim pGeoDataset As IGeoDataset
Dim pFeature As IFeature
Dim pGeom As IGeometry
Dim pPolyline As IPolyline
Set pErrorFeatCont = pTopology
Set pGeoDataset = pTopology
Set pEnumTopoError = pErrorFeatCont.ErrorFeaturesByGeometryType(pGeoDataset.SpatialReference, esriGeometryPolyline, False)
Set pTopoError = pEnumTopoError.Next
Do Until pTopoError Is Nothing
Set pFeature = pTopoError
Set pGeom = pFeature.ShapeCopy
Set pPolyline = pGeom
Debug.Print pTopoError.OriginClassID, pTopoError.OriginOID, pTopoError.DestinationClassID, pTopoError.DestinationOID, pPolyline.Length
Set pTopoError = pEnumTopoError.Next
Loop