在操作*.3dd文档时,ArcEngine给我们提供了IGlobeDocument的接口来操作*.3dd的文档,但是从arcgis developer Help的帮助文档中,我们可以了解到实际上对于AE开发已经不支持用IGlobeDocument的接口;
IGlobeDocument - The IGlobeDocument interface provides properties and methods for reading globe document files (*.3dd) and writing and saving changes to globe document files (*.3dd). However, since it is not tied to the ArcGlobe application, application-specific functionality in the GlobeDocument will not be persisted.
虽然下面可以通过IGlobeDocument打开*.3dd的文档,但是我们不能像AxMapControl.Map属性给AxGlobeControl.Globe赋属性,所以即使我们通过文档打开了,也不能够赋给控件,而时要用AxGlobeControl.Load3dFile方法来加载文档。当我们把AxGlobeControl.Globe赋给IGlobeDocument.Globe的属性时然后来保存的话就会报下面的错误:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt
所以我们要通过文档(像IMapDocument)来与控件界面进行直接传递就行不能了,那我们就需要换个方式来实现文档的加载与保存
AxGlobeControl.