ArcGlobe控件加载与保存文档

本文档介绍了在ArcEngine开发中,如何使用AxGlobeControl加载和保存*.3dd文档。由于IGlobeDocument接口不再支持,通过 AxGlobeControl.Load3dFile 方法实现加载,使用内存流和对象流配合IPersistStream接口来保存文件。保存的文件不能直接用ArcGlobe打开,需要使用相同方法重新加载。
摘要由CSDN通过智能技术生成

在操作*.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.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值