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


Get The Node-On-Links With The Same Reference Link As A Sublink Snippet (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference

Get The Node-On-Links With The Same Reference Link As A Sublink Snippet

Retrieve all the node-on-links that share the same reference link as a given sublink

[C#]
        /// <summary>
        /// Retrieve all the node-on-links that share the same reference link as a given sublink
        /// </summary>
        /// <param name="schemSubLink">The ISchematicInMemoryFeatureSubLink from which you want to retrieve the node-on-links</param>
        /// <returns>The retrieved EnumSchematicInMemoryFeatureNodeOnLink node-on-links</returns>
        public ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeatureNodeOnLink GetAllNodesOnLinkFromSubLink(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureSubLink schemSubLink)
        {
                // cast ISchematicInMemoryFeatureSubLink.ReferenceLink into ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink
                ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink schRefLink=(ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink)schemSubLink.ReferenceLink;

                return schRefLink.NodesOnLink;
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Retrieve all the node-on-links that share the same reference link as a given sublink
        ''' </summary>
        ''' <param name="schemSubLink">The ISchematicInMemoryFeatureSubLink from which you want to retrieve the node-on-links</param>
        ''' <returns>The retrieved EnumSchematicInMemoryFeatureNodeOnLink node-on-links</returns>
        Public Function GetAllNodesOnLinkFromSubLink(ByVal schemSubLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureSubLink) As ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeatureNodeOnLink

                ' cast ISchematicInMemoryFeatureSubLink.ReferenceLink into ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink
                Dim schRefLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink=TryCast(schemSubLink.ReferenceLink, ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink)

                Return schRefLink.NodesOnLink
        End Function

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