Applies To | |||
Product(s): | |||
Version(s): | V8i | ||
Environment: | N/A | ||
Area: | N/A | ||
Subarea: | N/A | ||
Original Author: | Akshaya Niraula, Bentley Technical Support Group | ||
Overview
It's always a huge challenge to maintain the synchronization between the source file and the Model. With the latest release of V8i, the powerful ModelBuilder got even powerfull and now we can update the source file also.
This is continuation of the "Building A Model Using Model Builder" and "Updating A Model Using Model Builder" however it can be used independently. These steps can be followed in several modeling software applications like, WaterGEMS, WaterCAD, SewerGEMS etc. The procedure described below uses GeoDataBase as an original source of modeling information and WaterGEMS as a modeling software.
Mantra, when updating source file, "The Hydraulic model is now source file and the GIS data is the target"
Let's assume the Hydraulic model got updated. An existing pipe got tapped in two places and a new loop of 8" pipe is established. With this update the ModelBuilder should do the following to the source file:
1) Split the existing pipe in two places (Meaning, create new features in source file)
2) Update the pipe attributes (Meaning, update the pipe information in source file)
Preview of Source File
Symbology has been applied to the modeling elements to better illustrate the updates.
Following image will show the population of the Unique ID in Pipe Table.
Updating Source File Using ModelBuilder
The steps described here will help to update the source file. This example updates the GeoDataBase source file however; any type of source file that was used to build the model can be updated. Before updating the source file directly it is recommended to make a back up copy of the source file that's planned to update by ModelBuilder.
Open ModelBuilder
Tools > ModelBuilder
ModelBuilder, as shown below, will show up.
Let's assume a worst case scenario that the existing link got deleted or file name /path got updated. If filename/path is the same, the existing link can be double clicked.
Specify your Data Source
The "Specify your Data Source" will show up. First select the Data Source type and then ‘Browse' for the source file, as shown. If the existing link on ModelBuilder is double clicked, there should not be any warning messages and/or the missing Tables.
In this step,
- source data can be selected
- tables/ layers can be selected/ deselected
- SQL query can be applied to filter the table if required
- source table can be previewed
When "Show Preview" box is checked, only highlighted Table will be displayed. Remember, if existing link is double clicked then the changes should be seen in the preview. If the changes are not there, start new model builder by clicking on "New" button on the first screen of ModelBuilder.
Click Next.
Specify Spatial and Connectivity Options
Depending upon the source file (Hydraulic Model elements) this screen may look different. In this step, first provide the unit of your Source Data. If not sure try with "ft".
Note: Source file does not have any Junction attributes.
Click Next.
Specify Element Create/Remove/Update Options
Depending upon the requirement the selection of options may vary. For this particular example following options are selected.
Note: For detail information, press F1 and help file will be launched.
Click Next.
Specify Additional Options
This step is particularly important if the source file has Unique ID. In this workflow, the Unique ID is maintained in "Label" field of the model so; the "Label" is selected in "Specify key field". If Source file has different Unique field then "GIS-ID" needs be selected. If there is no unique field in the source file then select "Label".
If the Unique ID field in source file name is say "WXYZ" then field "WXYZ" must be present in the Hydraulic Model. (User Data Extension from Tools menu is used to create "Custom" fields in Flex Table.) When new elements are created, Unique ID field (or WXYZ) will not be populated. As ModelBuilder will look for Unique ID under WXYZ field to update/create the new elements in source file, this Unique ID (WXYZ) must be populated with unique ID otherwise no new fields will be created.
Click Next.
Specify Field mappings for each Table/Feature Class
If the existing link had been double clicked then everything in this step should be good. If a new button had been clicked then all the necessary elements and the fields need to be mapped. Follow the "Specify Field mappings for each Table/Feature Class" from "Create A Model Using ModelBuilder" and come back to this step.
Click Next.
Create Model Now?
Select "No" and click on "Finish".
Click Finish.
Sync Out
Select the link that was just updated/used and click Sync Out.
Finally the screen should look like below with all the updates and new features as per the Hydraulic Model in the Source File.
This concludes the updating of the source file process using ModelBuilder.
See Also
Updating A Model Using Model Builder
Building A Model Using Model Builder
Haestad Methods Product Tech Notes And FAQs
External Links
Bentley Technical Support KnowledgeBase