Selecting Edges and Faces Associated with a Hole Feature in the SOLIDWORKS API

I’m trying to select all the edges or faces associated with a hole feature. After selecting the feature, the Selection Manager shows that only one object is selected, even though the 3D area appears to highlight the associated edges or faces.

Option Explicit
Dim swApp As Object
Dim swModel As Object
Dim selSet As Object
Dim i As Long
Dim n As Long
Dim edgeCount As Long
Sub Main()
    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    If swModel Is Nothing Then
        swApp.SendMsgToUser "No active document."
        Exit Sub
    End If
    Set selSet = swModel.SelectionManager
    If selSet Is Nothing Then
        swApp.SendMsgToUser "Selection manager not available."
        Exit Sub
    End If
    n = selSet.GetSelectedObjectCount2(-1)
    edgeCount = 0
    For i = 1 To n
        If selSet.GetSelectedObjectType2(i) = 3 Then
            edgeCount = edgeCount + 1
        End If
    Next i
    swApp.SendMsgToUser "Number of selected edges: " & edgeCount
End Sub

I believe you’ll need to get the hole wizard IFeature and get the feature definition as IWizardHoleFeatureData2 for the sketch points used for the hole. IFeature::GetFaces should return the faces that make up the hole wizard geometry.

If you select the hole wizard feature from the feature tree, the selection manager count is going to be one only. Am I missing something here?

Dim swFeat As SldWorks.Feature

Set swFeat = swSelMgr.GetSelectedObject6(1, -1)
faceArr = swFeat.GetFaces