![]() |
This document is archived and information here might be outdated. Recommended version. |
| ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get A Particular Type of Schematic Elements In A Schematic Diagram Snippet (ArcObjects .NET 10.4 SDK) |
Retrieve all the schematic elements based on a given type in a schematic diagram
/// <summary>
/// Retrieve all the schematic elements based on a given type in a SchematicDiagram
/// </summary>
/// <param name="schemDiagram">The SchematicDiagram which contains the schematic elements</param>
/// <param name="schemType">The type of the schematic elements that must be retrieved<</param>
/// <returns>The retrived ESRI.ArcGIS.Schematic.IEnumSchematicElement</returns>
public ESRI.ArcGIS.Schematic.IEnumSchematicElement SchematicElementsFromDiagramByType(ESRI.ArcGIS.Schematic.ISchematicDiagram schemDiagram, ESRI.ArcGIS.Schematic.esriSchematicElementType schemType)
{
ESRI.ArcGIS.Schematic.ISchematicElementContainer schElemCont=(ESRI.ArcGIS.Schematic.ISchematicElementContainer)schemDiagram;
return schElemCont.get_SchematicElementsByType(schemType);
}
''' <summary>
''' Retrieve all the schematic elements based on a given type in a SchematicDiagram
''' </summary>
''' <param name="schemDiagram">The SchematicDiagram which contains the schematic elements</param>
''' <param name="schemType">The type of the schematic elements that must be retrieved</param>
''' <returns>The retrived ESRI.ArcGIS.Schematic.IEnumSchematicElement</returns>
Public Function SchematicElementsFromDiagramByType(ByVal schemDiagram As ESRI.ArcGIS.Schematic.ISchematicDiagram, ByVal schemType As ESRI.ArcGIS.Schematic.esriSchematicElementType) As ESRI.ArcGIS.Schematic.IEnumSchematicElement
Dim schElemCont As ESRI.ArcGIS.Schematic.ISchematicElementContainer=TryCast(schemDiagram, ESRI.ArcGIS.Schematic.ISchematicElementContainer)
Return schElemCont.SchematicElementsByType(schemType)
End Function
End Class