Importing DXF files

Importing DXF files

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

  1.  Certain line work missing

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.

  1. Cannot see DXF background after importing into an existing DRAINS model

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.

  1. DXF Background is small or Not the same scale after importing into existing DRAINS model

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.

    • Related Articles

    • DXF and DWG files

      The drawing interchange format (DXF) file type, developed by AutoCAD, has been in use for many years and is accepted by almost all computer-aided drafting (CAD) systems. It is in ASCII format, and can be viewed on text editors. The DWG format is a ...
    • Importing and Exporting GIS Files

      DRAINS provides transfers of system data and results to between GIS programs and DRAINS, reading from and creating ESRI (ArcView) shapefiles and Mapinfo MIF files, the most commonly-used GIS formats. This facility is not standard in DRAINS, but is ...
    • Importing MapInfo files

      This process enables you to import data into DRAINS from one to six sets of MapInfo files, plus an optional background from a DXF file. The procedure is pretty much the reverse of the exporting process for MapInfo files. MapInfo stores spatial ...
    • Importing ESRI files

      This process enables you to import data into DRAINS from one to six sets of ESRI or ArcView files, plus an optional background from a DXF file. The procedure is pretty much the reverse of the exporting process for ESRI files. ArcView stores spatial ...
    • Exporting DXF files

      You can create a DXF file containing a plan of pipes and pits from the File menu. In the DXF files produced by DRAINS, pipes are represented by lines and nodes are represented by circles. These can be on different layers if you wish. One text value ...