Viewing and Inspecting AutoCAD DWG Data: Grouping Entities

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Files

Introduction

How your AutoCAD drawing file is interpreted by FME is largely dependent on which reader parameters are selected. Additionally, why you want to have your AutoCAD file interpreted a certain way is largely dependent on the type of translation you are performing and what you want in the output. Below are some brief descriptions of the main basic reader parameter options.

The major ways that we choose to read an AutoCAD drawing file are based on:

  • how we want to group our entities and
  • whether or not we want to explode blocks.

In this article, we'll examine how we can group entities.

 

Step-by-Step Instructions

Let's take a closer look at what each of the entity grouping options looks like in the Data Inspector, and how that will affect your translation. We will do this by examining the 'Group Entities By' parameter in the DWG/DXF reader.
 

1. Group Entities By Layer Name

Open the FME Data Inspector and select the Open Data Set icon, or use the File > Open Dataset menu option.

In the Open Dataset dialog, select Autodesk AutoCAD DWG/DXF for the format and the roads.dwg file as the dataset.

Click on the Parameters button.

For Group Entities By, choose the Layer Name option (this is the default).

1532-reader-parameters.png


If a user chooses to group their AutoCAD entities by layer name, then FME will treat each layer as an FME Feature Type in the workspace. Note that when viewed in FME Data Inspector, you are not able to see the associated attribute information in the layers. This is because the attribute schema is not considered when grouping by Layer Name. This is the default parameter for reading DWG files.

gb-layername-noschema.png

Group by Layer Name as viewed in the FME Data Inspector. Note that the data is grouped by layer in the Display Control window, but there is no attribute schema.

 

2.  Group Entities By Parameter Geometry

Keep the Data Inspector open and open the dataset again (it will open in a new View tab). Select the Open Data Set icon, or use the File > Open Dataset menu option.

In the Open Dataset dialog, select AutoCAD DWG/DXF for the format and the roads.dwg file as the dataset.

Click on the Parameters button.

For Group Entities By, choose the Geometry option.

geometry.png


If a user chooses to group entities by geometry, then entities will be sorted by their geometry types (e.g. points, lines, text etc.) and these geometry types will become the FME Feature Types in the workspace.

Note that in Workbench, all geometry types will be listed unless you specifically select which geometry types you want to be read. When inspecting data grouped by Geometry, the FME Data Inspector will automatically only display the geometry types present in your DWG.

gb-geometry-canvas.png

Group by Geometry as viewed in Workbench.
 

gb-geometry-inspector.png

Group by Geometry as viewed in the FME Data Inspector. Note that only line geometries are read.
 

3. Group Entities By Attribute Schema

Keep the Data Inspector open and open the dataset again (it will open in a new View tab). Select the Open Data Set icon, or use the File > Open Dataset menu option.

In the Open Dataset dialog, select AutoCAD DWG/DXF for the format and the roads.dwg file as the dataset.

Click on the Parameters button.

For Group Entities By, choose the Attribute Schema option.

attrschema.png


If a user chooses to group entities by Attribute Schema, then FME will group entities not only by their layer name but also by their associated attribute information. When viewed in the Data Inspector, the data will be displayed much like when grouping by Layer Name, but will also show the attribute schema in the Table View.

gb-attributeschema-inspector.png

Group by Attribute Schema as viewed in the FME Data Inspector. Note that the attribute data is now visible in the Table View and the data is grouped by layer.

 

Data Attribution

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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.