What is a ModelBuilder connection file (MBC) and can it be shared?
How can I copy or share my ModelBuilder connections?
After a ModelBuilder run has been created (see images below) a user can choose to export the properties of the run by clicking the 'Export Connection button'. ModelBuilder will create a .MBC file that can be shared with colleagues by using the "Import Connection" feature. Note:
A new batch import tool is now included for use in the Command line (CMD) on your computer. This allows for a faster import of .MBC files into ModelBuilder and more efficient model building workflows when using existing ModelBuilder connections.
From the CMD dialog, you can enter the name of tool (Haestad.ModelBuilder.BatchImport.Driver.exe) followed by an input flag with semicolon-delimited .MBC files. To do this, first open a CMD line window. Then, enter the name of the import tool (Haestad.ModelBuilder.BatchImport.Driver.exe) (this will be in same directory as WaterGEMS executable), followed by an input flag (-i) with semicolon-delimited mbc files. One of two other flags are required: -n (for new) or -o (for output), where -n flags require the name of a new model (.sqlite file) which will be created with the imported data and -o flag requires the name of an existing model which will be updated with the imported data. (The order of the flags doesn't matter.)
The following are some examples of the syntax for some use cases:
Import one ModelBuilder Connection File to one new model:
Import multiple ModelBuilder Connection Files to new model:
Import to an existing model:
Haestad.ModelBuilder.BatchImport.Driver.exe -o "C:\dev\existingModel.sqlite" -i "C:\dev\myMbcFile.mbc"
Each time you set up a ModelBuilder connection, it is saved in the list seen in the main ModelBuilder window. This window is what is first displayed when you open ModelBuilder (Tools > ModelBuilder). This list of connections is saved in a file called Modelbuilder.xml. The connections in this file will appear for any model on that computer. To move, copy or share the Modebuilder connection information, you'll need to copy that Modelbuilder.xml file to the other computer, then restart the OpenFlows product. Be sure that version of the OpenFlows product is the same on that computer. For instance, make sure WaterGEMS V8i SELECTseries 4 (build 08.11.04.58) is installed on both computers.The location of the Modelbuilder.xml file depends on the operating system:Windows XP: C:\Documents and Settings\(user profile name)\Application Data\Bentley\WaterGEMS\8\Windows Vista and Windows 7: C:\Users\(user profile name)\AppData\Roaming\Bentley\WaterGEMS\8\
Building a model using ModelBuilder