YouTube | Facebook | X(Twitter) | RSS

ラベルエンジンを Maplex に変更する方法

2016/9/1 (木)

'http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000m0000000
 
'標準ラベルエンジンはAnnotateMapをインスタンス化
 
Public Sub ChangeMxDocumentLabelEngine()
     
    'This simple subroutine will change the label engine for all data frames in a map to be the maplex label engine
    'You should have a maplex license enabled before running this code
     
    Dim pMxDoc As IMxDocument
    Dim pMaps As IMaps
    Dim pMap As IMap
    Dim index As Long
    Dim pAnnotateMap As IAnnotateMap
     
    Set pMxDoc = ThisDocument
    Set pMaps = pMxDoc.Maps
     
    'loop through all the maps
    For index = 0 To pMaps.Count - 1
        Set pAnnotateMap = New esriMaplex.MaplexAnnotateMap 'cocreate a new MaplexAnnotateMap object
        Set pMap = pMaps.Item(index) 'get the map at the current index
        Set pMap.AnnotationEngine = pAnnotateMap 'set the map AnnotationEngine to be MaplexAnnotateMap
        'after setting the AnnotationEngine, the Map automatically translates all labeling properties to Maplex.
    Next index
     
End Sub

関連記事

  • この記事を書いた人

羽田 康祐

伊達と酔狂のGISエンジニア。GIS上級技術者、Esri認定インストラクター、CompTIA CTT+ Classroom Trainer、潜水士、PADIダイブマスター、四アマ。WordPress は 2.1 からのユーザーで歴だけは長い。 代表著書『地図リテラシー入門―地図の正しい読み方・描き方がわかる』 GIS を使った自己紹介はこちら。ESRIジャパン(株)所属、元青山学院大学非常勤講師を兼務。日本地図学会第31期常任委員。発言は個人の見解です。

-プログラミング, ArcGIS
-,

WINGFIELD since1981をもっと見る

今すぐ購読し、続きを読んで、すべてのアーカイブにアクセスしましょう。

続きを読む