AnsweredAssumed Answered

VB.Net - Selecting only Polyline layers from the TOC

Question asked by Qu0ta7 on Jan 23, 2018
Latest reply on Jan 24, 2018 by kenbuja

I can successfully get all layers in the TOC into a combo box, but I only want to get layers that are of a polyline geometry in the TOC. My apologies, I do not know the proper method for inserting code here.


Protected Overrides Sub OnClick()
        Dim settingsForm As New Settings
        Dim myEnumLayers As ESRI.ArcGIS.Carto.IEnumLayer
        Dim fLayers As ESRI.ArcGIS.Carto.ILayer
            myEnumLayers = My.ArcMap.Document.FocusMap.Layers
            fLayers = myEnumLayers.Next
            Do Until fLayers Is Nothing
                If fLayers.Valid Then
                    If TypeOf fLayers Is ESRI.ArcGIS.Carto.IFeatureLayer Then
                    End If
                    fLayers = myEnumLayers.Next
                End If
        Catch ex As Exception
        End Try
  End Sub