Public Sub test() Dim pMXDocument As IMxDocument Set pMXDocument = ThisDocument Dim pMap As IMap Set pMap = pMXDocument.FocusMap Dim pEnumLayer As IEnumLayer Set pEnumLayer = pMap.Layers(Nothing, True) Dim pLayer As ILayer Set pLayer = pEnumLayer.Next Do While Not pLayer Is Nothing If TypeOf pLayer Is IGroupLayerayer Then Debug.Print "GroupLayerayer = " & pLayer.Name ' Do a recursive search here ElseIf TypeOf pLayer Is IGeoFeatureLayer Then Debug.Print "FeatureLayer = " & pLayer.Name End If Set pLayer = pEnumLayer.Next Loop End Sub
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.