SQL Prompts and Custom Actions to edit River Reach Parameters in InfoWorks ICM

The SQL or Structured Query Language functionality in InfoWorks ICM is a highly powerful and flexible way to edit a model network properties. A simple SQL which is commonly used when building river reaches is the following to set the Manning’s n value for all river sections.

Another useful SQL is the following to set discharge coefficients and modular ratios to the river reach banklines (which solve a weir equation).

An extension to these simple SQL queries would be to use dialogue boxes as specified in the following blog:-


We can use this functionality to create a prompt dialogues where we can specify a Manning’s n value, as well as discharge coefficients and modular limits which will get applied to the river reach sections and banklines accordingly.

LET $n = 0;

LET $A =0;

LET $B =0;

LET $C =0;

LET $D =0;

PROMPT TITLE “River Reach Parameters”;

PROMPT LINE $n “Mannings n value” DP 3;

PROMPT LINE $A “Left Bank Discharge Coefficient” DP 3;

PROMPT LINE $B “Right Bank Discharge Coefficient” DP 3;

PROMPT LINE $C “Left Bank Modular Limit” DP 3;

PROMPT LINE $D “‘Right Bank Modular Limit” DP 3;


SET sections.roughness_N=$n;

SET left_bank.discharge_coeff=$A;

SET right_bank.discharge_coeff=$B;

SET left_bank.modular_ratio=$C;

SET right_bank.modular_ratio=$D;

Figure 1: Prompt SQL

Figure 1: Prompt SQL

Upon running the SQL, the following prompt dialogue will appear which we can populate with our chosen values for the Manning’s n values, the discharge coefficients and the modular ratios.

Figure 2: Prompt Dialogue Box

Figure 2: Prompt Dialogue Box

Upon clicking OK, these will be applied to all river reaches.

We can then go one step further and use the custom actions functionality (http://blog.innovyze.com/2015/10/16/custom-actions/)

This allows us to specify a toolbar icon which will automatically run this SQL query for us. Under File-Master Database Settings it is possible to specify ‘User’ or ‘Shared’ Custom actions.  See the above blog for details of the difference between the 2.  A Title and a description can be added and the relevant SQL dragged into the appropriate dialogue box.

Figure 3: Shared Custom Actions Setup

Figure 3: Shared Custom Actions Setup

Once saved, the button is active on our ‘Shared Custom Actions’ toolbar.

Figure 4-shared actions toolbar1

Clicking on this icon will provide the dialogue from Figure 2.

Although this blog provides the example of the river reach parameters, it would be possible to do this for a range of different parameters such as bridge roughness parameters, structure parameters, 2D Resolution subcatchments etc…

Share this post!

    About Duncan Kitts

    Duncan Kitts is a Senior Support Engineer with Innovyze in the United Kingdom, specializing in River modelling and 2D modelling. He has over 9 years experience of modeling the key hydraulic processes involved in both fluvial systems and urban drainage environments. Duncan is responsible for providing support of both infoworks ICM and Infoworks RS.
    This entry was posted in InfoWorks ICM and tagged , , , , , , , . Bookmark the permalink.