WaterObjects.NET - Extending the capabilities of your OpenFlows product

Product(s): WaterCAD, WaterGEMS, HAMMER, StormCAD, SewerCAD, SewerGEMS, CivilStorm, PondPack
Area:  Modeling

What is Waterobjects.NET and what can I do with it?

Waterobjects.NET is the Application Programming Interface (API) used with Bentley's Hydraulics and Hydrology (OpenFlows) products, such as WaterCAD and WaterGEMS. It allows users with programming knowledge to extend the functionality of the product to suit their needs. Being .NET Framework-based allows support for a number of different programming languages, such as VB, C#, C++, etc (more information on that can be found here and here.)

Waterobjects.NET essentially provides a way to code routines/tools that take the data in a hydraulic model file, manipulate it in some way and either present output in a certain way and/or modify the model data. It is not intended as a way to modify the existing numerical engines or the user interface. Source code for those components are not provided.

Update October 2023: a new WaterObjects API will be available soon, which has been improved to be substantially simpler for casual programmers to quickly develop custom tools. It provides an easily accessible initial range of functionality through the OpenFlows namespace, with an emphasis on being able to quickly open, modify, run and view the results for a hydraulic model. For early access to this including documentation in both .NET and Python (for BDN members), please contact Technical Support.

How can I access it?

To use Waterobjects.NET, you need:

  • Programming knowledge
  • The software installed (Bentley WaterGEMS, Bentley SewerGEMS, etc)
  • A place to write your code:

Note: you will also need to learn the structure/schema of the OpenFlows products/code which will require a time investment. The SDK will help with this. Note: the upcoming WaterObjects API will greatly reduce the amount of learning required.

If you have the product already installed (SewerGEMS, WaterGEMS, etc) then you already have access to program with Waterobjects.NET. There is no separate installation file necessary. However, if you are a member of the Bentley Developer Network (BDN), then you can download the Software Development Kit (SDK) from our Software Downloads site (contact Technical Support if you have BDN and the download is not available), which is essential for learning how to program a WaterObjects.NET tool. The Waterobjects.NET SDK includes Programming and Sample guide documents as well as several samples (mostly written in C#). This will help guide you through how to use Waterobjects, though in most cases a high level of programming experience will be necessary as a prerequisite.

Note: there is not a separate documentation and language pack for WaterObjects.NET. Everything is included inside the main SDK download.

If you are unsure if you are a BDN member, contact your Bentley Account Manager or click the "contact" button here.

Note also that even if your organization is a BDN member, your Administrator will need to ensure that any individual users that need to download the SDK have a “Bentley Developer Network - Download” role, AND a “Product Delivery – Download” role – the latter is required for the former, it is mentioned in the following article: Available Roles

WaterObjects.NET SDK version Compatibility

The below table outlines general compatibility between the OpenFlows product version and the sample projects included in the WaterObjects.NET SDK.

In general, the first six digits of the version number of the latest available release corresponds with the current WaterGEMS release. For example corresponds with WaterGEMS If in doubt on compatibility, ask technical support via the forum.

WaterObjects.NET version Compatibility CONNECT Edition SQLITE-based versions such as V8i SS6 and below MDB-based versions

More information on the Bentley Developer Network (BDN):



Some benefits of BDN:

  • Access to the BDN Blog, which includes more examples of Waterobjects.NET projects (the below link will not work unless you are a member and are signed in):


  • Access to download the SDK via the Software Downloads Site (as mentioned above, this is essential for learning) Contact Technical Support if you have BDN and the download is not available.

More Information and Frequently Asked Questions

For a more in-depth FAQ on WaterObjects.NET, see the below FAQ PDF from 2012. Note that you must be signed in first or the link will not work.

Do I really need Waterobjects.NET for the Tool I Have in Mind?

Successful use of Waterobjects.NET often requires advanced programming experience and the willingness to take the time to learn the API. If used properly, it can be a powerful tool in extending the product functionality. However, due to the time investment that would typically be required, when considering if Waterobjects.NET is right for you, it's important to ensure that the functionality you desire isn't already available in the product itself. Bentley's Hydraulics and Hydrology products are robust, feature rich and flexible, out of the box. Below are some examples of using product functionality to do things that you might be considering Waterobjects.NET for:

Customizing a report of model input and/or output:

  • Flextables have the ability to export to .CSV format, which can be manipulated easily in external software such as Excel. So for example, you could create a new Flextable with the desired fields, export to CSV, then import the CSV file in Excel, along with custom formatting and functions that can manipulate the values.

  • Flextables also have the ability to export to XML format, which allows you to apply a custom style sheet.

  • In later releases such as the CONNECT Edition, you can export all elements to Excel at once via File > Export > Export to Excel
  • In later releases you can also create custom reports including element information, results, graphs, with customizable header, footer, etc
  • You can use Modelbuilder to "Sync out" (export) model input and output fields to a number of different formats. For example you could export to a database, which could be used in a external application to present results in a certain way. You could also configure a spreadsheet in Excel for example, with the formatting and functions you need, then export model results to that spreadsheet.


Performing a calculation based on model data/results

If you need to make a calculation that is a function of one or more input or result fields in the model, you can take advantage of the Formula-derived User Data Extension (UDX)  feature. This allows you to create a custom field whose value is based on a formula. This feature is quite flexible and the resulting data can be used like any other model input/output field, in that you can color code on it, annotate, etc. Note that formula UDX operates on information at a given timestep, so it currently cannot be used to aggregate data for multiple timesteps (such as finding the sum, min, max for a particular field across all timesteps). More information on Formula UDX can be found here:

Creating Formula Based User Data Extensions 

Advanced model querying and manipulation

Let's say for example you want to locate all junctions that are at a dead-end, then convert them all to hydrants. This can be done in the program already, by first using the "dead end junctions" predefined query (accessible from View > Queries or View > Network Navigator) to select the dead end nodes, then select Tools > Batch Morph, click the "selection" option, choose Hydrant as the new node type, then click OK. There are many other useful queries available in Network Navigator.

Specifics on using WaterObjects.NET for SewerCAD

See article: Using Waterobjects.NET for SewerCAD

What if I need help with Waterobjects.NET?


In general, support for Waterobjects.NET is provided by way of the community forum (including Bentley developers and other users). For general information on Waterobjects.NET and the Bentley Developer Network, post your question to the BDN forum (available to BDN members - must be signed in and a member of the community or the link will not work)

For other, technical questions such as how to program something or problems with your tool, use the OpenFlows | Hydraulics and Hydrology Community

For consulting services on developing a Waterobjects.NET tool, contact your Bentley Account Manager (sales representative).

See Also

Product TechNotes and FAQs

OpenFlows Product Tech Notes And FAQs