TOC のレイヤー凡例を展開・格納する方法

 2016/9/1 (木)    

Public Sub ExpandTOCLegend()
    Dim pMxDoc As IMxDocument
    Set pMxDoc = ThisDocument
     
    Dim pLegendInfo As ILegendInfo
    Set pLegendInfo = pMxDoc.FocusMap.Layer(0)
     
    Dim i As Long
    For i = 0 To pLegendInfo.LegendGroupCount - 1
        pLegendInfo.LegendGroup(i).Visible = Not pLegendInfo.LegendGroup(i).Visible
    Next i
     
    pMxDoc.UpdateContents
End Sub

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.