This document is archived and information here might be outdated. Recommended version. |
Retrieve a schematic element in a given schematic diagram from its name
/// <summary> /// Retrieve a SchematicElement in a SchematicDiagram from its name /// </summary> /// <param name="schemDiagram">The SchematicDiagram which contains the SchematicElement</param> /// <param name="schemType">The SchematicElement type</param> /// <param name="ElementName">The SchematicElement name</param> /// <returns>The retrieved SchematicElement</returns> public ESRI.ArcGIS.Schematic.ISchematicElement GetElementFromDiagramByName(ESRI.ArcGIS.Schematic.ISchematicDiagram schemDiagram, ESRI.ArcGIS.Schematic.esriSchematicElementType schemType, string ElementName) { ESRI.ArcGIS.Schematic.ISchematicElementContainer schElemCont=(ESRI.ArcGIS.Schematic.ISchematicElementContainer)schemDiagram; return schElemCont.get_SchematicElementByName(schemType, ElementName); }
''' <summary> ''' Retrieve a SchematicElement in a SchematicDiagram from its name ''' </summary> ''' <param name="schemDiagram">The SchematicDiagram which contains the SchematicElement</param> ''' <param name="schemType">The SchematicElement type</param> ''' <param name="ElementName">The SchematicElement name</param> ''' <returns>The retrieved SchematicElement</returns> Public Function GetElementFromDiagramByName(ByVal schemDiagram As ESRI.ArcGIS.Schematic.ISchematicDiagram, ByVal schemType As ESRI.ArcGIS.Schematic.esriSchematicElementType, ByVal ElementName As String) As ESRI.ArcGIS.Schematic.ISchematicElement Dim schElemCont As ESRI.ArcGIS.Schematic.ISchematicElementContainer=TryCast(schemDiagram, ESRI.ArcGIS.Schematic.ISchematicElementContainer) Return schElemCont.SchematicElementByName(schemType, ElementName) End Function