try
{
SaveFileDialog save3ddDialog = new SaveFileDialog();
save3ddDialog.Title = "保存3dd文件";
save3ddDialog.Filter = "3dd文件(*.3dd)|*.3dd";
save3ddDialog.FileName = "globe1.3dd";
if (save3ddDialog.ShowDialog() == DialogResult.OK)
{
IMemoryBlobStream pMemoryBlobStream = new MemoryBlobStream();
IObjectStream pObjectStream = new ObjectStream();
pObjectStream.Stream = pMemoryBlobStream;
IPersistStream pPersistStream = m_globeControl.Globe as IPersistStream;
pPersistStream.Save(pObjectStream, 1);
pMemoryBlobStream.SaveToFile(save3ddDialog.FileName);
}
else
{
return;
}
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message);
}