レイヤーが参照するフィーチャクラスの座標系の距離単位を表示

 2016/9/1 (木)    

Private Sub getLinearUnit()
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
     
     
    Dim pGeoFeatureLayer As IGeoFeatureLayer
    Set pGeoFeatureLayer = pMxDocument.FocusMap.Layer(0)
     
    Dim pGeoDataset As IGeoDataset
    Set pGeoDataset = pGeoFeatureLayer.FeatureClass
     
    Dim pProjectedCoordinateSystem As IProjectedCoordinateSystem
    Set pProjectedCoordinateSystem = pGeoDataset.SpatialReference
     
    Dim pLinearUnit As ILinearUnit
    Set pLinearUnit = pProjectedCoordinateSystem.CoordinateUnit
     
    Debug.Print "距離単位:" & pLinearUnit.Name
 
End Sub

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.