This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Get The Node-On-Links With The Same Reference Link As Another Node-On-Link Snippet (ArcObjects .NET 10.4 SDK) |
Retrieve all the node-on-links that share the same reference link as a given node-on-link
/// <summary> /// Retrieve all the node-on-links 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 node-on-links</param> /// <returns>The retrieved EnumSchematicInMemoryFeatureNodeOnLink node-on-links</returns> public ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeatureNodeOnLink GetAllNodesOnLinkFromNodeOnLink(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.NodesOnLink; }
''' <summary> ''' Retrieve all the node-on-links 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 node-on-links</param> ''' <returns>The retrieved EnumSchematicInMemoryFeatureNodeOnLink node-on-links</returns> Public Function GetAllNodesOnLinkFromNodeOnLink(ByVal schemNodeOnLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureNodeOnLink) As ESRI.ArcGIS.Schematic.IEnumSchematicInMemoryFeatureNodeOnLink ' cast ISchematicInMemoryFeatureNodeOnLink.ReferenceLink into ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink Dim schRefLink As ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink=TryCast(schemNodeOnLink.ReferenceLink, ESRI.ArcGIS.Schematic.ISchematicInMemoryFeatureReferenceLink) Return schRefLink.NodesOnLink End Function