選択オプションの設定

Sub GetSelectionEnvironment()
    Dim pMxApplication As IMxApplication
    Set pMxApplication = Application
    
    Dim pSelectionEnvironment As ISelectionEnvironment
    Set pSelectionEnvironment = pMxApplication.SelectionEnvironment
    
    Debug.Print pSelectionEnvironment.AreaSelectionMethod   '[選択] → [選択オプション] → [選択方法]
    
    Dim pSelectionEnvironmentLayer As ISelectionEnvironmentLayer
    Set pSelectionEnvironmentLayer = pSelectionEnvironment
    
    Debug.Print pSelectionEnvironmentLayer.ClearInvisibleLayers '新しい選択セットが作成されたとき、非表示レイヤの選択セットを解除
    
End Sub