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


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

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

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

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

                return schRefLink.SubLinks;
        }
[Visual Basic .NET]
        ''' <summary>
        ''' Retrieve all the sublinks that share the same reference link as a given node-on-link
        ''' </summary>
        ''' <param name="schemNodeOnLink">The ISchematicInMemoryFeatureNodeOnLink from which you want to retrieve the sublinks</param>
        ''' <returns>The retrieved IEnumSchematicInMemoryFeatureSubLink sublinks</returns>
        Public Function GetAllSubLinksFromNodeOnLink(ByVal schemNodeOnLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNodeOnLink) As ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeatureSubLink

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

                Return schRefLink.SubLinks
        End Function

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