Error opening model : Not a Valid Haestad Methods File or Error 40

Product(s): SewerGEMS, StormCAD, SewerCAD, CivilStorm, WaterGEMS, WaterCAD, HAMMER
Version(s): 08.11.XX.XX


When opening a model following error message occurs:

“Not a valid Haestad Methods File" or "Error 40".


This error is caused due to corrupted .dwh file. The .dwh file contains the last saved model element drawing display coordinates, symbology (eg. Color, Line Thickness Multipliers) and decorations (eg. Flow Arrows).

To know about types of supporting files like dwh,out etc. please see this technote.

Option 1: Delete the .dwh file from the folder

As the error caused due to corruption in the .dwh file, deleting the .dwh file and its supporting back up files as well, should help. After deleting the .dwh files, reopen the model, it should open.

Option 2: Move the model files to a new folder

Move just the starter file and the database file (.stsw and .stsw.sqlite) to the new folder. Once completed, open the model from the new location and see if the error occurs. This will regenerate the .dwh and other supporting files. 

Option 3: Import the Database file

Almost all of the model data is stored in the database file - .stsw.sqlite. The .stsw file has information on presentation (color coding and annotations), graphs, and the background file applied to the model. The rest of the model data is stored in the database file. For this reason, sometimes importing the database file into a new project can resolve the error.

To do this, go to File > Import > (product name) database. Select the database file associated with the model. The database will open in an new untitled worksheet. Note that the appearance (except color coding and backgrounds) will be the same as before, and all model data will be retained. Save this project and a new .stsw file will be created. This will also regenerate the .dwh file.

See Also

 Error when opening model with DXF background (HRESULT, acdb19.dll, AecBase.dbx, etc)