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


Get The In-Memory Node Schematic Features In A Schematic Layer Snippet (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference

Get The In-Memory Node Schematic Features In A Schematic Layer Snippet

Retrieve all the in-memory node schematic features from a schematic layer

[C#]
        /// <summary>
        /// Retrieve all the in-memory node schematic features from a schematic layer
        /// </summary>
        /// <param name="schemLayer">The ISchematicLayer from which the function has to get the in-memory node schematic features</param>
        /// <returns>The retrieved node IEnumSchematicInMemoryFeature</returns>
        public ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeature GetInMemoryNodesFromSchematicLayer(ESRI.ArcGIS.Schematic.ISchematicLayer schemLayer)
        {
                // get the schematic in memory diagram - the diagram needs to be loaded in memory
                ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagram schemInMemoryDiagram=schemLayer.SchematicInMemoryDiagram;
                if (schemInMemoryDiagram == null)
                        return null;


                return schemInMemoryDiagram.GetSchematicInMemoryFeaturesByType(ESRI.ArcGIS.Schematic.esriSchematicElementType.esriSchematicNodeType);
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Retrieve all the in-memory node schematic features from a schematic layer
        ''' </summary>
        ''' <param name="schemLayer">The ISchematicLayer from which the function has to get the in-memory node schematic features</param>
        ''' <returns>The retrieved node IEnumSchematicInMemoryFeature</returns>
        ''' <remarks></remarks>
        Public Function GetInMemoryNodesOnLinkFromSchematicLayer(ByVal schemLayer As ESRI.ArcGIS.Schematic.ISchematicLayer) As ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeature

                ' get the schematic in memory diagram - the diagram needs to be loaded in memory
                Dim schemInMemoryDiagram As ESRI.ArcGIS.Schematic.ISchematicInMemoryDiagram=schemLayer.SchematicInMemoryDiagram
                If (schemInMemoryDiagram Is Nothing) Then
                    Return Nothing
                End If

                Return schemInMemoryDiagram.GetSchematicInMemoryFeaturesByType(ESRI.ArcGIS.Schematic.esriSchematicElementType.esriSchematicNodeOnLinkType)
        End Function

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