TheSwamp
Code Red => .NET => Topic started by: MarioR on June 10, 2022, 03:59:57 AM
-
Hello,
i have a function that collect dwg entyties by crossing window and create a new document.
On end of function write the file with
newDoc.Database.SaveAs(filePathName, DwgVersion.Newest);
This display the "AutoCAD-Message"-box with Message:
"Warning: An error occurred while saving. It is recommended to execute the command RECOVER on the drawing"
(attach the screenshot of requester, sorry is in german ;-))
This same message thows the manuel selection and write with command WBLOCK.
How can i catch this Message on code?
regards Mario
-
I use the following to do that
using (doc.LockDocument())
{
using (Database dbase = new Database(true, false))
{
dbase.WblockCloneObjects(ids, dbase.CurrentSpaceId, new IdMapping(), DuplicateRecordCloning.Replace, false);
dbase.SaveAs(cncDwg, DwgVersion.Current);
}
}