ITinSelection の使用

      2017/12/09

’ ITinSelectionの使用
Public Sub Test()
    '現在のドキュメントを取得
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
     
    'アクティブなデータフレームの取得
    Dim pMap As IMap
    Set pMap = pMxDocument.FocusMap
     
    'レイヤを取得
    Dim pTinLayer As ITinLayer
    Set pTinLayer = pMap.Layer(0)
     
    Dim pTin As ITin
    Set pTin = pTinLayer.Dataset
     
    Dim pTinSelection As ITinSelection
    Set pTinSelection = pTin
     
    Call pTinSelection.SelectByEnvelope(esriTinTriangle, pMxDocument.ActiveView.Extent, False, False, esriTinSelectionNew)
'    Call pTinSelection.SelectAll(esriTinTriangle, True)
     
    Debug.Print pTinSelection.SelectedElementCount(esriTinTriangle)
     
    pMxDocument.ActiveView.Refresh
     
End Sub

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