WaterObjects.NET - Extending the capabilities of your OpenFlows product

Product(s): WaterCAD, WaterGEMS, HAMMER, StormCAD, SewerCAD, SewerGEMS, CivilStorm, PondPack
Version(s): V8 XM, V8i, CONNECT Edition
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 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.

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.

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 website, 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.

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

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 10.00.00.01 corresponds with WaterGEMS 10.00.00.50. If in doubt on compatibility, ask technical support via the forum.

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

More information on the Bentley Developer Network (BDN):

https://www.bentley.com/en/software-developers

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):

http://communities.bentley.com/communities/other_communities/bentley_developer_network/b/bentley_developer_network-blog

  • Access to download the SDK via the Fulfillment Center  (as mentioned above, this is essential for learning)

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 

Anonymous
Recommended
Related