This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get The SchematicInMemoryFeatureClass Related To A Schematic Element Class From An In-Memory Schematic Diagram Snippet (ArcObjects .NET 10.4 SDK) |
Retrieve the SchematicInMemoryFeatureClass related to a given schematic element class from an in-memory schematic diagram
/// <summary> /// Retrieve the SchematicInMemoryFeatureClass related to a given schematic element class from an in-memory schematic diagram /// </summary> /// <param name="schemInMemoryDiagram">The input ISchematicInMemoryDiagram</param> /// <param name="schemElementClass">The related ISchematicElementClass</param> /// <returns>The retrieved ISchematicInMemoryFeatureClass</returns> public ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureClass GetSchematicInMemoryFeatureClassFromSchematicInMemoryDiagramByElementClass(ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagram schemInMemoryDiagram, ESRI.ArcGIS.Schematic.ISchematicElementClass schemElementClass) { // cast SchematicInMemoryDiagram into ISchematicInMemoryFeatureClassContainer ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureClassContainer schInMemoryFeatureClassCont=(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureClassContainer)schemInMemoryDiagram; // return the ISchematicInMemoryFeatureClass related to the desired ISchematicElementClass return schInMemoryFeatureClassCont.GetSchematicInMemoryFeatureClass(schemElementClass); }
''' <summary> ''' Retrieve the SchematicInMemoryFeatureClass related to a given schematic element class from an in-memory schematic diagram ''' </summary> ''' <param name="schemInMemoryDiagram">The input ISchematicInMemoryDiagram</param> ''' <param name="schemElementClass">The related ISchematicElementClass</param> ''' <returns>The retrieved ISchematicInMemoryFeatureClass</returns> Public Function GetSchematicInMemoryFeatureClassFromSchematicInMemoryDiagramByElementClass(ByVal schemInMemoryDiagram As ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagram, ByVal schemElementClass As ESRI.ArcGIS.Schematic.ISchematicElementClass) As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureClass ' cast SchematicInMemoryDiagram into ISchematicInMemoryFeatureClassContainer Dim schInMemoryFeatureClassCont As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureClassContainer=TryCast(schemInMemoryDiagram, ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureClassContainer) ' return the ISchematicInMemoryFeatureClass related to the desired ISchematicElementClass Return schInMemoryFeatureClassCont.GetSchematicInMemoryFeatureClass(schemElementClass) End Function