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


Get A Particular Type of Schematic Elements In A Schematic Diagram Snippet (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference

Get A Particular Type of Schematic Elements In A Schematic Diagram Snippet

Retrieve all the schematic elements based on a given type in a schematic diagram

[C#]
        /// <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);
        }
[Visual Basic .NET]
        ''' <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

Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.Schematic