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


IMapTopology.FindClass Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (EditorExt)  

IMapTopology.FindClass Method

Finds the zero-based index of the specified feature class.

[Visual Basic .NET]
Public Function FindClass ( _
    ByVal fclass As IFeatureClass _
) As Integer
[C#]
public int FindClass (
    IFeatureClass fclass
);

Product Availability

Available with ArcGIS Desktop.

Remarks

This method has been depricated in favor of IMapTopology.FindLayer

 

[C#]
public void FindClass()
{
  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;
  IMapTopology mapTopology=topologyExt.MapTopology;
  mapTopology.AddClass(fc0);
  int featureClassID=mapTopology.FindClass(fc0);
}
[Visual Basic .NET]
  Public Sub FindClass()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim extUid As UID=New UIDClass()
    extUid.Value="esriEditorExt.TopologyExtension"
    Dim topologyExt As ITopologyExtension=TryCast(app.FindExtensionByCLSID(extUid), ITopologyExtension)
    Dim mapTopology As IMapTopology=topologyExt.MapTopology
    mapTopology.AddClass(fc0)
    Dim featureClassID As Integer=mapTopology.FindClass(fc0)
  End Sub

See Also

IMapTopology Interface

.NET Samples

Curve conversion add-in (Code Files: CurveConversionDockWin)