Generating Unique ID numbers for your river network








  1. Open the attribute table of your river layer.


Open attribute table


  1. Click on the Options button for the table and then select Add a new field.


Add field

  1. Define field properties.  In this example a Field called River_ID of type Long integer with a precision of 16 is defined.

Setting field properties


A new field is created with all values set to zero.


  1. Right click on the heading of the new field and select calculate values.


Calculate the field


  1. You may get a warning message about calculating outside an edit session, simply select YES to continue.


  1. Tick the Advance check box to enable VBA scripting.


  1. You can either type in the following code or download the calculator expression file here.  If you download this text file you need to load the code into the calculator by clicking on the LOAD. . . button.


Setting the field calculate




RivEX Logo