Private Sub testAnnoClasses() 'sample input Dim intAnnoClassID As Integer intAnnoClassID = 0 '------------ Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument Dim pMap As IMap Set pMap = pMxDoc.FocusMap Dim pFeatureLayer As IFeatureLayer Set pFeatureLayer = pMap.Layer(0) Dim pAnnoClass As IAnnoClass Set pAnnoClass = pFeatureLayer.FeatureClass.Extension Dim pSymbolColl As ISymbolCollection2 Set pSymbolColl = pAnnoClass.SymbolCollection Dim pSymbolIdentifier As ISymbolIdentifier2 pSymbolColl.Reset Set pSymbolIdentifier = pSymbolColl.Next MsgBox pSymbolColl.Count For i = 0 To pSymbolColl.Count - 1 If pSymbolIdentifier.ID = intAnnoClassID Then MsgBox "i=" & i & " symbolID=" & pSymbolIdentifier.ID & "," & pSymbolIdentifier.Name Exit For End If Set pSymbolIdentifier = pSymbolColl.Next Next i End Sub
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.