Dim pDoc As IMxDocument
Set pDoc = ThisDocument
'获得ARCGIS软件中的MAP
Dim pMap As IMap
Set pMap = pDoc.FocusMap
'定义WGS84坐标系统
Dim pSpRef1 As ISpatialReference
Dim pSpRFc As SpatialReferenceEnvironment
Set pSpRFc = New SpatialReferenceEnvironment
Dim pGCS As IGeographicCoordinateSystem
Set pGCS = pSpRFc.CreateGeographicCoordinateSystem(esriSRGeoCS_WGS1984)
Set pSpRef1 = pGCS
pSpRef1.SetFalseOriginAndUnits -180, -90, 1000000
'获得地图图层的坐标系统
Dim lyr As ILayer
Set lyr = pMap.Layers.Next
Dim pGeoDataSet As IGeoDataset
Set pGeoDataSet = lyr
Dim pPCS As IProjectedCoordinateSystem
Dim pSpRef2 As ISpatialReference
Set pPCS = pSpRFc.CreateProjectedCoordinateSystem(esriSRProjCS_Xian1980_3_Degree_GK_Zone_38)
pPCS.SetFalseOriginAndUnits 0, 0, 1000
Set pSpRef2 = pPCS
Dim pPoint As IPoint
Set pPoint = New Point
'80.17, 34.06为经纬度
pPoint.PutCoords 80.17, 34.06
Set pPoint.SpatialReference = pSpRef1
pPoint.Project pGeoDataSet.SpatialReference
MsgBox "x:" + Str(pPoint.X) + "," + "y:" + Str(pPoint.Y)