How to Convert DWG to DGN (AutoCAD to MicroStation)

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2022.2


This article will show you how to convert an AutoCAD DWG (*.dwg) file to MicroStation DGN (*.dgn) in FME. In addition to a basic format-to-format translation, we will modify the schema and use the DGNStyler to style the output data.


Note: this video was created with FME version 2016.0. Some of the steps might be slightly different, but the overall process is the same. The instructions below are for 2022.2.

Step-by-Step Instructions

In this scenario, we will use road data, which is divided into different layers for each road type, each of which has a different symbology. We will transform the symbology, convert the AutoCAD attributes to MicroStation tags, and merge a few layers before writing to DGN.

Download this article's attachments, including the source data and finished workspace, to follow along.

1. Create a blank workspace in FME Workbench

Open FME Workbench and start a blank workspace.

2. Add an AutoCAD reader

Click Add Reader and set the following parameters:

  • Format: Autodesk AutoCAD DWG/DXF
  • Dataset: <Path to tutorial download>/Roads.dwg
  • Parameters: Group Entities By: Attribute Schema

Setting the parameter to group by attribute schema means we can visualize the layers with attribute information. Note how there are other parameters to control other aspects of reading the DWG data too.

Screenshot 2023-01-24 at 10.52.58 AM.png

Click OK to add the reader to the workspace.

The Select Feature Types dialog will appear. Leave all feature types checked to import all layers, and click OK.

Screenshot 2023-01-24 at 11.00.04 AM.png

You have successfully added a DWG reader for Roads.dwg to the workspace. The canvas should look as follows:
Screenshot 2023-01-25 at 11.17.29 AM.png

3. Add Bentley Microstation Design (V8) DGN writer

Click Add Writer, and set the following:

  • Format: Bentley Microstation Design (V8) DGN
  • Dataset: <Path to destination>/Roads

Screenshot 2023-01-25 at 11.06.01 AM.png

Click Parameters, and set the following:

  • Write tags: Yes
  • Seed File (V8 only): <Path to FME installation>/design/seed2d_ft_v8.dgn

The "Write tags" parameter tells FME to write tags for the features. The "Seed File" parameter specifies a 2D output instead of 3D. Seed files are located in your FME installation folder. For example, *\FME 2022.2\design\seed2d_ft_v8.dgn on Windows or /Library/FME/2022.2/design/seed2d_ft_v8.dgn on Mac.

Screenshot 2023-01-25 at 11.12.53 AM.png

Click OK on the Parameters dialog and OK again to add the writer to the workspace.

The Select Feature Type dialog will appear. Select all feature types and click OK.

Screenshot 2023-01-25 at 11.13.39 AM.png

You have successfully added a DGN writer to the workspace. The canvas should look as follows:
Screenshot 2023-01-25 at 11.17.22 AM.png

4. Modify the output schema, i.e. perform schema mapping

The workspace currently creates an exact copy of the source data. We would like to modify the layers in the output file before running it.

(a) Drag the connections from the input feature types "NonCity", "Other", and "Private" to the output layer "Other".
(b) Connect the rest of the input feature types to their respective outputs.
(c) Delete the unused NonCity and Private output feature types.

The workspace should look as follows:

Screenshot 2023-01-25 at 11.43.36 AM.png

5. Add a DGNStyler transformer

We will now style the output symbology. Add a DGNStyler and connect it before the Other output feature type. The workspace should look as follows:

Screenshot 2023-01-25 at 11.47.24 AM.png

Open the transformer's parameters and set the following:

  • Color:
    • Check the box
    • RGB Color: choose a color or set it to lilac by copy-pasting: 0.666667,0.666667,1
  • Lines:
    • Check the box
    • Line Weight: 3
    • Line Style: 2

Screenshot 2023-01-25 at 11.53.10 AM.png

Click OK. You have successfully styled the output DGN symbology.

6. Run the workspace
Click Run Workspace. When the translation is complete, navigate to the output DGN dataset in your file system. You can inspect the output using the FME Data Inspector or a 3rd-party CAD viewer such as Bentley View.

Note how the line data in the DGN file has been written using the symbology specified in the DGNStyler, and the DWG attributes have been written as MicroStation tags. In the below Bentley View screenshot, you can see the Burrard Bridge in Vancouver has been styled under the Other writer feature type (dashed line) and has its attributes as tags.



Data Attribution

The data used here originates from data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.

Was this article helpful?



Please sign in to leave a comment.