Troubleshooting problems with importing/exporting EPANET files


Product(s): WaterGEMS, HAMMER, WaterCAD
Version(s): 08.11.XX.XX and higher
Area: Layout and Data Input

 

Problem

When trying to import an EPANET .INP file into WaterGEMS, WaterCAD or HAMMER, the import fails and/or a message similar to the below appears:

1) "The specified EPANET file could not be loaded. Error message: The specified EPANET file contains values with no section. Format does not follow EPANET standards."

2) Error: Key in dictionary: #### Key being added: ##### (where # is some number) 

3) When importing an .INP file (EPANET) the model doesn't  display correctly. For example, all the junctions in the model file are at a 0, 0 location.

4) The program crashes with a dialog titled "Assertion Failed"

5) Missing pipes when exporting to EPANET (see "see also" below)

6) The Pattern time step is imported incorrectly.

Background

These issues may occur in some cases where the EPANET file is in an older format or if it was created from a third-party software that did not properly export the file (or exported it with non-standard formatting).

Note:

Solution

Typically, software developers verify the "correctness" of their exported format by importing a model into EPANET 2 and checking hydraulic results. The issue with this approach is that EPANET 2 itself supports older INP formats and upon opening an INP in EPANET 2, if it detects such older file formats it does silent updates to convert the data into EPANET 2 format. So it is possible that if a model is exported from a third-party software but in an older format, that the .INP file may not fully work in WaterCAD/WaterGEMS, which is designed to support the official EPANET 2 format.

The following steps should help with most cases of this issue:

1) Open the file in EPANET and do a "File > Save As" to rename it just to be sure the filename isn't an issue. This saves the file in .NET format.

2) Then in EPANET do a "File > Export > Network", which saves the file back to a .INP format. This new INP file opened in WaterCAD/WaterGEMS through the File > Import > EPANET process.

Opening the file in EPANET may also reveal clues about any formatting problems that may cause problems with the WaterCAD/WaterGEMS import. For example you may be presented with a dialog listed various error codes. In one example, the "Assertion Failed" error was found to be caused by spaces in the node names, which were listed as error code 203 when the INP file was opened in EPANET.

Specific issues:

Pattern time step is imported incorrectly

If your pattern times were incorrectly imported from EPANET to OpenFlows products (e.g., 15 minutes is imported as 15:00 hours), make sure there are no empty spaces in the EPANET pattern time (see the attached screenshot). This should solve the issue. 

 

 

See Also

Missing pipes when exporting to EPANET

Importing or exporting to WaterCAD, WaterGEMS, or HAMMER from other software

What are the differences between WaterGEMS/CAD and EPANET?