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
Try
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
settingsForm.ComboBox1.Items.Add(fLayers.Name)
End If
fLayers = myEnumLayers.Next
End If
Loop
Catch ex As Exception
End Try
settingsForm.Show()
End Sub