Many water companies provide guidelines to their consultants/staff defining how to name dummy nodes in a hydraulic model. This gives the water company full leverage over the hydraulic model externally and keeps data organised. However, for the most part, these conventions are easy to talk about but difficult to remember...
A hydraulic modeller often doesn't get payed for searching through the, often verbose, documentation on model building to find what they should use while naming their nodes. Instead, they often choose one standard and stick with it. To make the modeller's lives a little easier we can build a 'model build' ruby script library/add-on. Something which provides functionality which is so useful a modeller is insentifised to use it. In such a library we can include our node-naming conventions.
A well known feature of ICM is that you can automatically generate node names following a selected format.
One little known feature however, is that you can fully customise this to fit your needs using GIS layers. For example, let's say you have a GIS zone layer open named 1_km_Grid. In my case, this is the Ordanance Survey 1km grid
Now, I'll set the pattern to the following:
{G}{X3}{Y3}{C}
Whenever I create a new node using these settings I get a model node like:
SU54602601
SU54602602
SU54602603
...
Though this is common knowledge, I think few people know that you can automate the process of setting the node naming conventions. You can do so with Ruby, however I assume you can also do so with SQL as well but I have not yet figured out how.
In ruby we can take it one step further by also checking whether the layer the modeller needs open, is indeed open:
net=WSApplication.current_network
net.transaction_begin
net.row_object("hw_prefs","geo_new_node_name_generator").memo = "Custom"
net.row_object("hw_prefs","geo_new_node_name_generator").write
net.row_object("hw_prefs","geo_new_node_name_pattern" ).memo = "{G}{X3}{Y3}{C}
net.row_object("hw_prefs","geo_new_node_name_pattern" ).
net.row_object("hw_prefs","geo_new_node_name_gis_layer").memo = "[SHP] 1_km_Grid"
net.row_object("hw_prefs","geo_new_node_name_gis_layer").write
net.row_object("hw_prefs","geo_new_node_name_gis_field").memo = "PLAN_NO"
net.row_object("hw_prefs","geo_new_node_name_gis_field").write
net.transaction_commit
#Check whether the layer is currently open, if so it should be in MapXtremeLayers
layers = WSApplication.current_network.row_object("hw_prefs","MapXtremeLayers").Memo
path = 'I:\Tools\JW\Resources\1_km_Grid.shp'
if layers.index(path) ==nil
WSApplication.input_box("Please open the following table.","Layer not open.",path)
end
The above script can be altered to work with different assets and each ruby script compiled into an ICM-Addon for each node naming convention.
Default_NodeNaming.rb
SPS_NodeNaming.rb
CSO_NodeNaming.rb
STW_NodeNaming.rb
...
Special node naming conventions are great but give your modeller's the tools they need to do it easily!