ネットワーク解析フィーチャを特定する方法

Sub GetResultElements()
    'ユーティリティネットワークエクステンションにアクセスする
    Dim pUtilityNetworkAnalysisExt As IUtilityNetworkAnalysisExt
    Set pUtilityNetworkAnalysisExt = Application.FindExtensionByName("esriEditorext.UtilityNetworkAnalysisExt")
    
    Dim pNetworkAnalysisExt  As INetworkAnalysisExt
    Set pNetworkAnalysisExt = pUtilityNetworkAnalysisExt
    
    Dim pTraceTasks  As ITraceTasks
    Set pTraceTasks = pUtilityNetworkAnalysisExt

    Dim pTraceTaskResults As ITraceTaskResults
    Set pTraceTaskResults = pTraceTasks.CurrentTask

    Dim junctionEIDs  As IEnumNetEID
    Set junctionEIDs = pTraceTaskResults.ResultJunctions
    
    Dim edgeEIDs As IEnumNetEID
    Set edgeEIDs = pTraceTaskResults.ResultEdges

'    Dim pNetworkAnalysisExtResults As INetworkAnalysisExtResults
'    Set pNetworkAnalysisExtResults = pUtilityNetworkAnalysisExt
'
'    Dim junctionEID As Long
'    Dim edgeEID As Long
'
'    junctionEIDs.Reset
'    junctionEID = junctionEIDs.Next
'
'    Do Until junctionEID = 0
'
'        Debug.Print "Junction", junctionEID
'        junctionEID = junctionEIDs.Next
'    Loop
'
'    edgeEID = edgeEIDs.Next
'    edgeEIDs.Reset
'    Do Until edgeEID = 0
'
'        Debug.Print "Edge", edgeEID
'        edgeEID = edgeEIDs.Next
'    Loop
   
    
    Dim pEIDHelper As IEIDHelper
    Set pEIDHelper = New EIDHelper
    pEIDHelper.ReturnFeatures = True
    Set pEIDHelper.GeometricNetwork = pNetworkAnalysisExt.CurrentNetwork
    
    Dim pEnumEIDInfo As IEnumEIDInfo
    
    'ジャンクションの取得
    Set pEnumEIDInfo = pEIDHelper.CreateEnumEIDInfo(junctionEIDs)
    pEnumEIDInfo.Reset
    
    Dim pEIDInfo As IEIDInfo
    Set pEIDInfo = pEnumEIDInfo.Next

    Do Until pEIDInfo Is Nothing
        Debug.Print "Junction", pEIDInfo.Feature.OID
        Set pEIDInfo = pEnumEIDInfo.Next
    Loop
    
    'エッジの取得
    Set pEnumEIDInfo = pEIDHelper.CreateEnumEIDInfo(edgeEIDs)
    pEnumEIDInfo.Reset
    
    Set pEIDInfo = pEnumEIDInfo.Next
        
    Do Until pEIDInfo Is Nothing
        Debug.Print "Edge", pEIDInfo.Feature.OID
        Set pEIDInfo = pEnumEIDInfo.Next
    Loop

End Sub