ArcEngine打开MXD文件
using System.Windows.Forms;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Carto;
public void JoinSHP(AxMapControl e, AxTOCControl a)
{
OpenFileDialog op = new OpenFileDialog();
op.Filter = "ArcMap文档(*.mxd)|*.mxd";
op.Title = "打开文档";
op.RestoreDirectory = true;
if (op.ShowDialog() == DialogResult.OK)
{
string pFilePath = op.FileName;
IMapDocument pm = new MapDocument();
pm.Open(pFilePath, "");
e.Map = pm.ActiveView.FocusMap;
e.ActiveView.Refresh();
}
}