Internal Error in AutoCAD: eNotOpenForWrite

Applies To
Product(s): WaterGEMS, WaterCAD, SewerGEMS, SewerCAD, StormCAD, CivilStorm
Version(s): CONNECT Edition, 08.11.04.xx
Environment: AutoCAD
Area: Modeling
Original Author: Scott Kampa, Bentley Technical Support Group



One of the following error messages appears when opening an existing model in the AutoCAD integrated platform:

"INTERNAL ERROR: !dbobji.cpp@8749: eNotOpenForWrite"

"INTERNAL ERROR: !dbobji.cpp@8673: eNotOpenForWrite"

Solution - AutoCAD 2022 and 2023

With AutoCAD 2022 integration in version 10.03.04.XX and higher (and later with AutoCAD 2023 integration that will be available in future versions), there is a known issue (reference # 708152) that can cause this error to occur when opening existing DWGs that had been previously saved using AutoCAD 2010 or older, including those with XREFs saved in an older version. After you dismiss the message AutoCAD offers to save the model:

"AutoCAD Alert ... AutoCAD cannot continue. You can attempt to save changes into the following file... After you save your changes, you can open or recover the file. Should AutoCAD try to save your changes?"

Clicking Yes or No redisplays the message and a few seconds after that AutoCAD crashes, disappears and displays the AutoCAD Error Report dialog. 

As of June 22nd, 2022 a patch is available to resolve this issue for version of the Water products and of the Storm and Sewer products. This patch is available to users with a subscription by contacting Technical Support (Service Request / Forum) This fix will also be included in future new versions, so the other solution is to upgrade to a newer version when available.

Here are some other workarounds:

  1. Open and re-save the model in an earlier version of AutoCAD. For example WaterGEMS for AutoCAD 2021. Once you save the file there it can be opened in AutoCAD 2022 or 2023 without any issue. This is the preferred solution and if you do not have access to an earlier version of AutoCAD, you can contact Technical Support for assistance by posting on the forum and referencing this article. Methods are available to share the data files (and .DWG).
  2. The DWG can also be opened in plain AutoCAD 2022 or 2023 and re-saved but you will lose the connections to the OpenFlows product's hydraulic elements. So, you will need to re-import the sqlite file.


Note that this issue is also known to occur (in 2022 and 2023) when an older DWG file (again, 2010 and earlier) is added as an XREF. Here are two potential solutions:

  1. Open the XREF'd DWG in plain AutoCAD (without the OpenFlows product integrated) and re-save, then try opening the model in the integrated version again.
  2. If this does not work, try one of the following known solutions:
    1. Export the offending DWG (the one that was attached as an XREF) to DGN (link), then attach the DGN as an XREF in AutoCAD (rename the existing DWG XREF first so that you can open the model). See more details here. Note that if you encounter a permissions issue, try saving to the root of your C:\ drive. When prompted for a MicroStation Seed file, try choosing one of the Seed files available in the "AutoCAD Templates" folder seen when clicking the browse button.
    2. If you have access to MicroStation, you can open the XREF DWG, save to DGN format, then attach the DGN as an XREF in AutoCAD. (rename the existing DWG XREF first so that you can open the model)
    3. Beyond the above options, the only known solution at this time is to use an older, supported version of AutoCAD such as 2021, or use the Standalone version. See: CAD Functionality in Standalone as an Alternative to AutoCAD or MicroStation Integration

Solution - AutoCAD Start screen

This can also happen when opening certain existing model files from the AutoCAD Start screen. In this case, try starting a new drawing. Once this is done, open the file by going to the "A" menu at the top or the File pulldown menu, and choosing Open.

Solution - Upgrade

This issue has been known to occur for some models when using V8i SELECTseries 4. However, testing has indicated that after upgrading to a later release, the error will no longer occur. Be sure to check the Compatibility Chart to assure that the version of WaterGEMS or WaterCAD you are using will integrate with your AutoCAD version.

Solution - Re-import model

As of 2021-Sep-16 this error is known to occur with some DWG files where the only known solution is to import the model into a blank DWG. To do this, start a new project in the AutoCAD integrated version, go to the product menu item (for example "WaterGEMS", choose the "import" option, then select the model's associated .SQLITE file. This will import the model into the blank drawing. Then, save the .DWG somewhere else with a new file name, close and reopen to confirm that the error does not occur. If you add XREFs and the problem starts happening again after reopening, you may have encountered a known issue with Autodesk and the DWG file may be corrupt. See this article for more. Another potential solution is to use the Standalone version of the OpenFlows product with appropriate background layers attached. If a model file associated with a .DWG is edited in the Standalone version and later reopened in the AutoCAD integrated version and the changes will synchronize. See: CAD Functionality in Standalone as an Alternative to AutoCAD or MicroStation Integration