Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Save Mxd Document using C# code

$
0
0
Hi My requirement is to Open an Arc map application and close it automatically through C# coding.

For that I Wrote below code

IDocument pDoc = new MxDocumentClass();
pApp = pDoc.Parent;
pApp.OpenDocument(sMxdFileName);

if (pApp != null)
{

pApp.Shutdown();
}
// pApp.saveDocument is not working

Everything is fine , But before shutdown statement is executing , In Map same dialog box like save changes to Mxd and Yes or No Buttons are avaialble there. We should able to handle that control also through coding before execute the Shutdoen statement.i.e we should close the document opened with affected changes.

can u please suggest me the code for that

Viewing all articles
Browse latest Browse all 1374

Trending Articles