阅读:1985回复:2
engine保存mxd
我想问一下 c#编写engine怎样使用对话框保存mxd文件。就是使用savefiledialog对话框保存的代码。
|
|
1楼#
发布于:2012-03-28 18:10
里边的<span style="font-family: monospace;"> </span>mapDocument 是表示当前文档的IMapdocument对象<br/>
|
|
2楼#
发布于:2012-03-28 18:08
[br]1 //保存地图文档[br]2 private void saveDocument()[br]3 {[br]4 if (mapDocument.get_IsReadOnly(mapDocument.DocumentFilename) == true)[br]5 {[br]6 MessageBox.Show("地图文档是只读的无法保存");[br]7 }[br]8 string fileSavePath = @"e:\new.mxd";[br]9 try[br]10 {[br]11 mapDocument.Save(mapDocument.UsesRelativePaths, true);[br]12 MessageBox.Show("保存地图文档成功");[br]13 }[br]14 catch (Exception e)[br]15 {[br]16 MessageBox.Show("保存地图文档失败!!!" + e.ToString());[br]17 }[br]18 } |
|