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
記事