Introduction

This example will show you how to transform City of Vancouver Postal Code data from ESRI Shapefile (*.shp) to AutoCAD Drawing (*.dwg) format, and store the attributes as Extended Entity data.

Downloads

Feel free to download and unzip the data (ForwardSortationAreas.zip file) attached to this exercise if you\'d like to perform these steps yourself as we go along!

The ESRI Shapefile forward sortation areas file denotes the different postal districts covering Vancouver.

Source Data

The Forward Sortation Areas data set provided here comes from Statistics Canada, 2011 Census Digital Boundary Files, 2013. 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.

Step-by-Step Instructions

To create the demo, you will need to carry out the following steps.

1) Inspect the source (reader) dataset in FME Data Inspector

Start FME Data Inspector. In Windows this is found under Start > All Programs > FME Desktop > FME Data Inspector

Using Windows Explorer, drag the ESRI Shapefile into the data inspector and click OK.

You can see that we have area features representing forward sortation areas. There is a single attribute (CFSAUID) which identifies the forward sortation area by the first three-digits of the postal code.

2) Start FME Workbench

In Windows this is found under Start > All Programs > FME Desktop > FME Workbench

3) Select Generate Workspace

This is found under File > Generate Workspace. Alternatively, use Ctrl+G as a shortcut.

4) Browse to and select the source (Reader) dataset

Select Esri Shapefile for the source format; do this by typing the name into the field until it appears within the dropdown list. Navigate to the ForwardSortationAreas.shp file and select the dataset.

5) Set the output (Writer) format to Autodesk AutoCAD DWG/DXF

Select Autodesk AutoCAD DWG/DXF for the format for the writer; do this by typing the name into the field until it appears within the dropdown list.

6) Modify the output dataset Parameters

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.

7) Set the output dataset name and location

Set the output file name to be VancouverFSA.dwg. Click OK to create the workspace.

8) Click the Run button on the toolbar

Run the workspace by clicking on the green play button. This carries out the translation.

9) View the DWG in FME Inspector

Open FME Inspector. Using Windows Explorer, drag the VancouverFSA.dwg file into FME Inspector and click OK. When prompted, "Select Dataset to View", open the reader Parameters and 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.

Refer to the Knowledge Base exercise Viewing and Inspecting AutoCAD DWG Data for more information on the "Group Entities By" options for AutoCAD DWG/DXF files.

results matching ""

    No results matching ""