GetRelatedShapes problem

May 4, 2016 at 3:10 AM
Edited May 4, 2016 at 3:12 AM
This seems like a simple enough feature to use but I am not getting any results and I can't find anything except the function documentation. This is in the ShapeIdentified event:
    Dim sf As New MapWinGIS.Shapefile
    Dim i As Integer, ret As Boolean, s As String
    Dim shapes() As Integer

    AxMap1.set_Shapefile(e.layerHandle, sf)
    ret = sf.GetRelatedShapes(e.shapeIndex, MapWinGIS.tkSpatialRelation.srIntersects, shapes)

    If ret = True Then

        For i = 0 To shapes.GetUpperBound(1)

            s = s + sf.CellValue(0, shapes(i)) + vbNewLine

        Next i

        MsgBox(s, MsgBoxStyle.Critical)

    End If