Protected Overrides Sub OnClick() Dim pMaps As IMaps Dim pMap As IMap Dim index As Long pMaps = My.ArcMap.Document.Maps Dim pAnnotateMap As IAnnotateMap For index = 0 To pMaps.Count - 1 pMap = pMaps.Item(index) 'get the map at the current index pAnnotateMap = pMap.AnnotationEngine If TypeOf pAnnotateMap Is IMaplexAnnotateMap Then MessageBox.Show("データフレーム「" & pMap.Name & "」を標準ラベルに変更前:pMap.AnnotationEngine.Name=" & pMap.AnnotationEngine.Name.ToString) pMap.AnnotationEngine = New ESRI.ArcGIS.Carto.AnnotateMap MessageBox.Show("データフレーム「" & pMap.Name & "」を標準ラベルに変更後:pMap.AnnotationEngine.Name=" & pMap.AnnotationEngine.Name.ToString) Else MessageBox.Show("データフレーム「" & pMap.Name & "」をMaplexラベルに変更前:pMap.AnnotationEngine.Name=" & pMap.AnnotationEngine.Name.ToString) pMap.AnnotationEngine = New ESRI.ArcGIS.Maplex.MaplexAnnotateMapClass MessageBox.Show("データフレーム「" & pMap.Name & "」をMaplexラベルに変更後:pMap.AnnotationEngine.Name=" & pMap.AnnotationEngine.Name.ToString) End If Next index End Sub
ラベルエンジンの切り替え
2016/9/1 (木)