I have some code that works fine. But after I run an AutoCAD command, the code will not work. I get the error 'eWasOpenForWrite'. The reason could be, that AutoCAD has opened the drawing database for write, but did not close. What can be done in my code to tackle this problem?