This operation is performed to provide a background to a DRAINS model. It can be done for a new DRAINS model or for a model that already has a background. The two procedures are described below.
(a) Initial importing
Pipes and pits can be imported into DRAINS as a network diagram from a DXF file. The pits should be represented as circles and the pipes as straight lines. They can be on the same or different layers of the DXF file. Pipes should be the only lines on the layer and pits should be the only circles on their layer. If pits are represented by other symbols, such as rectangles, a new layer can be created with the locations of pits marked by circles.
The pipes and pits will be given names automatically, but you can change the names later if you wish. DRAINS will ask you for the names of the pipe and pit layers in the following dialog box:
After importing the DXF file, if it is drawn to scale you can specify the length of one pipe and DRAINS will determine the lengths of all the other pipes based on their proportional lengths.
For large networks it is strongly recommended that you create the network diagram from a DXF file drawn to scale. If your base file is in DWG or other formats, it can be converted to DXF in your drawing package. It is best to select an old version of DXF, such as DXF 2000 ASCII format,
If you wish to import a background only, you need to include a dummy pit and place some dummy pipes at the extremities of this, otherwise the complete background will not appear - DRAINS only shows the part of the background that is near to pipes. However, if only part of the background appears, the rest can be made accessible by extending the drawing area using the option in the View menu.
(b) Replacement or addition
If a background is already present, the name of the option in the File menu changes. Selecting the File → Import → Import DXF background option opens a dialog box from which you can select a DXF file. Once you do this, the following message appears:
When you make your selection, all layers of the nominated DXF file will be imported.
Trouble Shooting
Importing a DXF file should work for all regular line work & text from CAD. Blocks cannot be imported, and certain poly lines may not come through. You would need to explode these in CAD before importing them.
Common issues with not seeing any line work is usually related to the user preparing a DRAINS model on a different coordinate to the CAD model. It is best to start a DRAINS model with importing a DXF model background with at least 1 pipe & a pit either end to set a scale (eg a 100m long pipe). If you update the CAD file, you can then continue to reimport the DXF file without issues. You could try exporting the DRAINS model DXF Plan (File > Export > DXF Plan) into CAD to attempt to align the CAD file to DRAINS' coordinates, however it is best to generally start DRAINS from a correct coordinate in the first place.
Another common issue with the DXF file appearing small could be related to the model being in metres while the CAD model being in millimetres. Alternatively, again if the DRAINS model was created without any reference DXF file, then then model's scale could be completely random which may make the DXF appear either very small or large in comparison.