Error importing old model file: "Object reference not set to an instance of an object"

  Product(s): WaterGEMS, WaterCAD, HAMMER, SewerGEMS, SewerCAD, CivilStorm, StormCAD
  Version(s): CONNECT Edition, V8i
  Area: Modeling

Problem

When importing an older model file, the following error message is generated: 

"Object reference not set to an instance of an object" 

or

"The path provided is not a WaterCAD V7 file" in case of WaterCAD files.

Solution

Option 1 - Import database

If there is a problem with one of the supporting files, try importing the database. This is done by selecting "database files" from the "Files of Type" dropdown in the File Open dialog, then select the .SQLITE (or .MDB for old models) file associated with the model.

Option 2 - Use a backup of the model

The database associated with the model could have become corrupted. If you have a backup file or an older version of the model file, try to open this instead.

See: Can I restore a backup file of my model project or software component?

Option 3 - Compact the .MDB database in Microsoft Access

For issues with older models that include a .MDB database file (the latest versions use .SQLITE database files) , corruption can sometimes be corrected by compacting that file in Microsoft Access. If the file opens in Microsoft Access, then try to compact the database. If the file will not open in Access, the file is corrupted and cannot be used. You can try to recreate the file in the program you are using. If you have a source file for the model, such as a shapefile, ModelBuilder is a good tool for this.

See:

Option 4- Upgrade

It may help to download and install the latest version of the product and patch set.

See:

[Defect Reference # 803172]

Option 5 - Reinstall Microsoft  C++ Redistributable 

Please check if Microsoft C++ Redistributable has become corrupt, reinstalling it would help here. 

Option 6 - Contact Support

If the model database has become corrupt and the above does not help, contact Technical Support. A secure link can be provided to obtain a copy of the model, and Bentley Support can work with the Development team to attempt to repair the database as needed.

See Also

Converting older WaterCAD/WaterGEMS files into WaterCAD/WaterGEMS V8i format and saving presentation settings

Recommended
Related