arcengine 保存
/// <summary> /// 保存MXD图件 /// </summary> /// <param name="strPath">保存路径</param> /// <param name="pMap">地图</param> private void saveMxd(string strPath) { IMapDocument pMapDocument = new MapDocumentClass(); pMapDocument.New(strPath); pMapDocument.ReplaceContents((IMxdContents)axPageLayoutControl1.Object); pMapDocument.SetActiveView(axPageLayoutControl1.ActiveView); pMapDocument.Save(true, true); }
/// <summary> /// 保存MXD图件 /// </summary> /// <param name="strPath">保存路径</param> /// <param name="pMap">地图</param> private void saveMxd(string strPath, IMap pMap) { IMxdContents pMxdC; pMxdC = pMap as IMxdContents; IMapDocument pMapDocument = new MapDocumentClass(); pMapDocument.New(strPath); IActiveView pActiveView = pMap as IActiveView; pMapDocument.ReplaceContents(pMxdC); pMapDocument.Save(true, true); }
本博有部分内容来自网络,如有问题请联系:hebeilijianghua@qq.com,并注明来自博客园。