Message 1 of 6
Compile code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Need help to compile the code to run...
thanks
[CommandMethod("RecoverTest", CommandFlags.Session)]
publicvoid RecoverTest() // This method can have any name
{
Document doc =
Application.DocumentManager.MdiActiveDocument;
DocumentCollection docs = Application.DocumentManager;
Editor ed = doc.Editor;
OpenFileDialog file =
newOpenFileDialog("Select file to recover", null,
"dwg;dxf", "Recover",
OpenFileDialog.OpenFileDialogFlags.DoNotTransferRemoteFiles);
//show the dialog and take the dwg input
System.Windows.Forms.DialogResult dr = file.ShowDialog();
if (dr != System.Windows.Forms.DialogResult.OK)
return;
try
{
//call AppContextRecoverDocument to revover the selected DWG.
docs.AppContextRecoverDocument(file.Filename);
}
catch
{
ed.WriteMessage("Unable to recover the drawing\n");
}
}
"Save Energy"
Did you find this reply helpful? If so please use the Accept as Solution
Did you find this reply helpful? If so please use the Accept as Solution