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


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

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

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

[C#]
        /// <summary>
        /// Retrieve all the in-memory link schematic features from a schematic layer
        /// </summary>
        /// <param name="schemLayer">The ISchematicLayer from which the function has to get the in-memory link schematic features</param>
        /// <returns>The retrieved link IEnumSchematicInMemoryFeature</returns>
        public ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeature GetInMemoryLinksFromSchematicLayer(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.esriSchematicLinkType);
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Retrieve all the in-memory link schematic features from a schematic layer
        ''' </summary>
        ''' <param name="schemLayer">The ISchematicLayer from which the function has to get the in-memory link schematic features</param>
        ''' <returns>The retrieved link IEnumSchematicInMemoryFeature</returns>
        Public Function GetInMemoryLinksFromSchematicLayer(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.esriSchematicLinkType)
        End Function

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