Vous êtes sur la page 1sur 12

Hydraulics and Hydrology

This is where you can find and contribute to discussions, ideas, and other
information about Hydraulics and Hydrology.
Importing A CAD Drawing Using Modelbuilder [TN]

Applies To

Product(s):
Bentley WaterCAD, Bentley WaterGEMS, Bentley HAMMER,
Bentley StormCAD, Bentley SewerCAD, Bentley SewerGEMS,
Bentley CivilStorm
Version(s): 08.11.XX.XX
Environment: N/A
Area: Layout and Data Input
Subarea: N/A

Original
Author:
Jesse Dringoli, Bentley Technical Support Group












Overview
Some older versions of the Hydraulics and Hydrology product line (WaterCAD, WaterGEMS, StormCAD and
SewerCAD) used a much different procedure for converting "polylines to pipes", compared to the 08.XX.XX.XX
versions. This TechNote provides tips and techniques for effectively importing a CAD drawing into V8 XM or V8i
using the new method. This procedure is similar for WaterCAD, WaterGEMS, HAMMER, StormCAD, SewerCAD,
SewerGEMS, and CivilStorm.
Background
In older versions of WaterCAD, WaterGEMS, StormCAD and SewerCAD, the user would import a CAD drawing
(.dxf or .dwg) via File > Import > Polyline to Pipe. Upon release of the V8 XM edition, this functionality was
merged into Modelbuilder, which is a powerful tool used to import many different types of data. Since the steps
Ver esta pgina en: Espaol Traducir Desactivar para: Ingls Opciones
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
1 de 12 07/04/2014 11:45 a.m.
for a CAD drawing, which could initially cause some confusion to new users of V8 XM and V8i.

Preparing the CAD Drawing
1. First, you should take some time to clean up your CAD drawing prior to performing the conversion. Look for
entities that should not be converted, such as leader lines, and move them to their own layer. Turn off or remove
layers that you do not wish to convert. Do a quick review of your drawing and correct any potential conversion
problems that you may find.
Note: It is recommended that you perform a "save-as" before cleaning up the drawing, so
that you can retain the original.
2. Next you will need to save your CAD drawing into a DXF format, as this is the only format that Modelbuilder
currently accepts. DXF is the "drawing exchange format", so almost all CAD programs have the ability to save to
it. Whenever possible, try to save to the earliest DXF format, for better compatibility. For example, in AutoCAD,
go to File > Save As, and choose "2004 DXF" as the format.

Importing Your CAD Drawing Using Modelbuilder
Note: This process remains the same whether you are in the standalone, AutoCAD,
Microstation, or ArcGIS platform.
Note: This process assumes that you have certain pipe diameters separated by layer.
Note: This process assumes you're using V8i. If you're using V8 XM instead, the steps
in the Modelbuilder process will look slightly different. The basic process remains the
same, though.
1. Open WaterCAD/GEMS and start a new project. Ensure that the correct unit system is specified.Go to Tools >
User Data Extensions.
2. Right click on "Pipe" and choose to create a new user data extension. We will import the layer name into this
field so that we can assign diameters at a later point. Give it a name, keep the default data type of "Text" and
click OK.
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
2 de 12 07/04/2014 11:45 a.m.
3. Start Modelbuilder by going to Tools > Modelbuilder. In the main window, click the "New" button to start a
new Modelbuilder run.
4. In the first step, select "CAD Files" as the Data Source type and browse to your .dxf file. Once selected, a table
will be displayed in the lower left corner, showing all the layers that exist in the drawing. Layers that you would
like to be imported should be checked. Unchecked layers will not be imported. The layer type will be displayed
after the name of each layer, showing you if the layer contains points, lines, or polygons. In this example, we
have checked only the layers that represent water distribution pipes of various diameters. Layers containing
roads, annotations and other irrelevant items have been unchecked:
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
3 de 12 07/04/2014 11:45 a.m.
Note: If you have a lot of layers that need to be unchecked, you can right-click
anywhere in the list and choose "clear selection".
Note: In many cases, nodal elements such as tanks, pumps, etc are represented in a CAD
drawing as a series of lines. In this case, they cannot be imported as their respective
nodes in the modelbuilder process. The user must enter these elements later on after
the import.
5. Click the Next button to proceed to the second step. In this step, you should select the appropriate unit and
also make sure the check box next to "Establish connectivity using spatial data" is checked. This option allows
Modelbuilder to use the spatial information inside the CAD file (lengths, coordinates of endpoints/bends, etc) to
build the model, instead of the user needing to explicitly specify the start/stop node (which is typically not
possible for a CAD drawing.)
In addition to this, the "Tolerance" field will allow Modelbuilder to automatically connect pipe end points that
are within the specified value. Make sure "Create nodes if none found at pipe endpoint" is checked. In most
cases, only polylines are imported from a CAD drawing, so you'll want junctions to be created at the ends of
these.
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
4 de 12 07/04/2014 11:45 a.m.
For the "Tolerance" options, take the following CAD line for example:
In this zoomed-in view, notice that a gap exists due to drawing imperfections. This gap is 1.5ft wide.
Now, if we import this CAD file with 1ft set as the tolerance, it will create two nodes at the actual end
points of these pipes:
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
5 de 12 07/04/2014 11:45 a.m.
This is because the distance between the end points was not within the tolerance. If we were to instead
import this drawing with a 2ft tolerance, it would connect these end points and join them at a junction:
6. In the next Modelbuilder step, you will only need to keep the "Add objects to destination if present in
source" box checked, since we are creating new elements based on the CAD drawing data.
7. In the next step, accept "Current scenario" and "Label".
8. In the next step, you must configure how the data in each layer is mapped to WaterCAD/GEMS. Click each
layer from the list on the left and then configure the attributes on the right:
"Table Type"
This is used to select the type of element that a layer will be imported as. For a CAD file, you will most likely be
importing polylines only. So, this field will be set to "Pipe" (for WaterCAD, WaterGEMS and HAMMER) or
"Conduit" (for SewerCAD, SewerGEMS and CivilStorm).
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
6 de 12 07/04/2014 11:45 a.m.
This is the field used to create labels for the elements created by the modelbuilder process. It is also used to link
up elements when updating existing ones. In the case of importing a CAD drawing, most likely a field containing
unique labels does not exist for the polylines. So, you should select "<label>" for each layer. This will cause
Modelbuilder to automatically generate unique labels, utilizing a combination of an element's layer type label, its
shape type, and a numeric ID that represents the order in which it was created.
"Start"/"Stop"
Choosing the "Establish connectivity using spatial data" causes the connectivity information to be taken from the
CAD drawing, so you do not need to specify a start/stop node field for the pipes/lines. So, simply leave these as
"<none>".
"Attribute"
At the bottom right corner of this Modelbuilder step, the user can link fields in the source data to fields in the
program. In the case of a CAD drawing, typically there are no additional, useful attributes. However, you could
link the "Layer" field to the user data extension attribute that you created in step 2. In this example, the user data
extension was named "AutoCADLayer":
By linking this field, there will be an attribute in the WaterCAD/GEMS model that contains the name of the layer
that the pipe came from. Later on this will be useful.
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
7 de 12 07/04/2014 11:45 a.m.
Note: Make sure that you set the key/label field and "layer" mapping for each layer. If
your DXF contains points, they will show up as separate layers on the left side. You
can then click and assign them to a node element type such as Junction.
9. In the last Modelbuilder step, choose to build the model. Modelbuilder will then import the layers and
provide you with a summary, including a "Messages" tab that you can use to view informational messages about
the import process. In this case, there are some messages about nodes being created due to missing start/stop
nodes. This is expected since we were only importing polylines, with the "Create nodes if none found at
endpoint" option selected.
10. After closing the summary and closing Modelbuilder, you will be prompted to synchronize the drawing.
Choose "Yes" and your model should show up in the drawing area. If it does not, then go to View > Zoom >
Zoom Extents.
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
8 de 12 07/04/2014 11:45 a.m.
Note: Upon completion of your ModelBuilder run, it is suggested you use the Network
Navigator tool to identify any connectivity or topological problems in your new mode

Assigning Pipe Diameters
Now that our model has been created, we can assign diameters to the pipes, based on the layer attribute that
we imported.
1. Open the pipe flextable via View > Flextables.
2. Click the yellow Edit button ( ) and add your user data extension. To do this, first find it in the list on the
left side, click on it, and then click the single arrow button pointing to the right side. Click OK and you will now
see a column in the flextable, containing the layer that each pipe came from. In our example case, the layer
"12_WATER" represents 12" pipes, "16_WATER" represents 16" pipes, and so forth.
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
9 de 12 07/04/2014 11:45 a.m.
3. Right click on any of the column headers, choose "Filter", and select "Custom". In the query window, double
click on your user data extension field from the list on the left and click the equals sign button. Then, click the
green button on the top-right corner to retrieve a list of unique values from this field. Double click on one of the
diameters (layer names) shown. In our example case, we'll start with the 10" layer:
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
10 de 12 07/04/2014 11:45 a.m.
When you click OK in the query window, the flextable will be filtered to only show pipes that came from the layer
that you queried on (those from the "10_WATER" layer in our example case.)
Note: After performing your filter, the bottom left corner of the flextable will show
you how many pipes met the query condition and are displayed (for example "68 of 4714
elements displayed")
4. Now, assign the correct diameter by right clicking on the "Diameter" column header and choosing "Global
Edit". Keep the operation as "Set", and enter the appropriate diameter as the value. Click OK and your diameters
will be assigned.
5. Repeat steps 3 and 4 for each layer, assigning out all your diameters.
Note: When done, you can reset your filter by right clicking on any column header and
then choosing Filter > Reset.
Note: An alternative way to assign diameters would be to bring each layer in one by
Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
11 de 12 07/04/2014 11:45 a.m.
Prototypes, and set the pipe diameter to the smallest one in your CAD Drawing. Next,
uncheck all layers in the first Modelbuilder step except for the one corresponding to
that diameter. Import the pipes per above and they'll be assigned the diameter
specified in the prototype. Next, change the pipe prototype diameter to the next size,
open the Modelbuilder run again, uncheck the first diameter and check the next one.
Continue on like this for each diameter.
See Also
Product TechNotes and FAQs
Haestad Methods Product Tech Notes And FAQs
External Links
Water and Wastewater Forums
Bentley Technical Support KnowledgeBase
Bentley LEARN Server

Importing A CAD Drawing Using Modelbuilder [TN] - Hydraulics and ... http://communities.bentley.com/products/hydraulics___hydrology/w/hyd...
12 de 12 07/04/2014 11:45 a.m.