How to convert SHP to DWG (Esri Shapefile to AutoCAD)

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

This example will show you how to transform the City of Vancouver Postal Code data from an Esri shapefile (.shp) to an AutoCAD drawing (.dwg) format and store the attributes as extended entity data.

The Esri shapefile (forwardsortationareas.shp) denotes the different postal districts covering Vancouver. A forward sortation area (FSA) is a geographical region in which all postal codes start with the same three characters. The first letter of an FSA code denotes a particular "Postal District".

Step-By-Step Instructions

1. Inspect the Data in FME

The first step is to inspect the ForwardSortationAreas.shp file. Open a blank FME Workspace and add a new reader. In the Add Reader dialog, type in Esri Shapefile, then browse to the ForwardSortationAreas.shp file. Click OK to add the reader to the canvas.


To view the data, click on the ForwardSortationAreas reader feature type on the canvas to open the mini menu. Then click the View Source Data button to view the data in the Visual Preview window.

We have area features representing the forward sortation areas. The forward sortation area is identified by a single attribute (CFSAUID), which is the first three characters of the postal code.

2. Set the Output (Writer) Format to AutoDesk AutoCAD DWG/DXF

Next, we need to add a writer to the canvas. Click on the Add Writer and in the Add Writer dialog, for the Format, select Autodesk AutoCAD DWG/DXF.

For the Dataset, browse to where you would like to save the file and name the file VancouverFSA.dwg.

By default, AutoCAD DWG files do not store attributes. However, attributes can be stored in AutoCAD DWG files as extended entity data.

Click on Parameters, and set the Attribute Output to Extended Entity Data. Then click OK and OK again to add the writer.

In the Feature Type dialog, set the Layer Name to FSAs, then click OK. 

3. Run the Workspace

Connect the reader and writer feature types. Once connected, run the workspace by clicking on the green play button.

4. View the Output

To view the output dataset, click on the ForwardSortationAreas writer feature type to open the mini menu. Then click on the Open Containing Folder button.

Next, either open FME Data Inspector or use Visual Preview and drag the VancouverFSA.dwg file into FME Data Inspector or the Visual Preview window. In the Select Dataset to View dialog, click on the Parameters button.

In the parameters, set Group Entities By to Attribute Schema. This will ensure that you can view the attributes in your AutoCAD DWG file that were saved as extended entity data. Then uncheck Explode Blocks Into Entities. This will keep any of the polygons together as one unit and not break them into their parts.

Click OK twice to close the dialog and view the dataset.

With the Attribute Schema selected, you can now see the attributes when viewing a DWG file in FME. Refer to the article Viewing and Inspecting AutoCAD DWG Data: Grouping Entities for more information on the “Group Entities By” options for AutoCAD DWG/DXF files.

Data Attribution

The data used here originates from Statistics Canada's 2011 Boundary files. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada. © This data includes information copied with permission from Canada Post Corporation.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.