Error while editing the Modelbuilder.xml file with the third party application

  Applies To 
  Product(s): Bentley WaterGEMS, Bentley WaterCAD, Bentley Hammer
  Environment:  N/A
  Original Author: Sushma Choure, Bentley Technical Support Group


When trying to edit the Modelbuilder.xml file with the third party application like “HM Manager”, to avoid having to configure the source file connections in the Modelbuilder tool of WaterGEMS SS5, I am getting error as shown below.

“Error Loading Connections: Object reference not set to an instance of an object.”


It could be done without any error with WaterGEMS SS4, but WaterGEMS SS6 is giving this error. 


This is related to the Modelbuilder.xml file

The file format did change a bit between SS4 and SS5 versions of WaterGEMS (at the top of the file there is a version number; it increased from “9” to “10”).

  <StorageElementHeader Id="1" Version="10"

Adding the text highlighted in red will resolve the issue (You can write this additional text even in the SS4 file).

<ExternalDatabaseLink … SpatialOptionSpatialConnectivityTolerance="1" SpatialOptionHasSpatialReference="false" SpatialOptionSpatialReference="NONE" SyncOptionAddElements="true" …