空間参照のエクスポート

 2016/9/1 (木)    

'ThisDocumentの取得
Dim pMxDocument As IMxDocument
Set pMxDocument = ThisDocument
 
'アクティブなデータフレームの取得
Dim pMap As IMap
Set pMap = pMxDocument.FocusMap
 
'空間参照オブジェクトの取得
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

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.