Public Sub subExportSpatialReference() 'ThisDocumentの取得 Dim pMxDocument As IMxDocument Set pMxDocument = ThisDocument 'アクティブなデータフレームの取得 Dim pMap As IMap Set pMap = pMxDocument.FocusMap 'SpatalReferenceを取得 Dim pESRISpatialReference As IESRISpatialReference Set pESRISpatialReference = pMap.SpatialReference Dim pBytes As Long Dim pBuffer As String * 512 '変数領域を確保しないとクラッシュする pESRISpatialReference.ExportToESRISpatialReference pBuffer, pBytes Debug.Print pESRISpatialReference.ESRISpatialReferenceSize Debug.Print pBuffer Debug.Print pBytes End Sub '参考 'http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeometry/IESRISpatialReference.htm
空間参照情報のテキスト出力
2016/9/1 (木)