Introduction
This example uses FME Workbench to convert 2D rooms from a CAD floor plan to 3D Spaces in IFC. We will be using the new IFC writer, introduced in FME 2025, to perform this.
Requirements
- FME Form 2025.2+
Source Data
The source data is an AutoCAD DWG dataset representing a building floor plan.
The floor plan polygons will be elevated to the proper floor height. They possess attributes for the room number (Name), purpose (LongName), and ceiling height (Height).
Step-by-Step Instructions
1. Add a RealDWG/DXF Reader
In a blank workspace, add a new reader to the canvas.
- Format: Autodesk AutoCAD RealDWG/DXF
- Dataset: \FloorPlan.dwg
- Workflow Options: Single Merged Feature Type
Then click OK.
Part 1: Create Floors
2. Sample floors
Add a Sampler transformer and connect it to the reader feature type. This will sample one feature per floor, allowing us to assign features to their corresponding floors.
In the Sampler Parameters:
- Group Processing: Enabled
- Group By: fme_feature_type
- Sampling Type: First N Feature
3. Add an AttributeCreator
Add an AttributeCreator to the canvas. Connect the Sampled output port to the AttributeCreator. In the Parameters, create new attributes as follows:
| Output Attribute | Value |
| ifc_element_type | BuildingStorey |
| ifc_name | fme_feature_type(attribute) |
| ifc_longname | LongName(attribute) |
| ifc_global_id | fme_feature_type(attribute) |
Of particular interest, we are adding ifc_global_id, which will be used to assign the floor as a parent feature of each space.
4. Add an AttributeRenamer
Add an AttributeRenamer:
- Input Attribute: ifc_global_id
- Output Attribute: ifc_parent_id
Part 2: Create Spaces
6. Add an Extruder
Add an Extruder transformer to the canvas and connect the reader feature type to it. In the parameters:
- Distance: Height
7. Add an AttributeCreator
Add another AttributeCreator to the canvas, connect it to the Extruder, and set the values as shown in the table below:
| Output Attribute | Value |
| ifc_parent_id | <null> |
| ifc_name | Name(attribute) |
| ifc_longname | @Value(Name) - @Value(LongName) [Text Editor] |
| ifc_type | LongName(Attribute) |
8. Add a FeatureMerger
Add a FeatureMerger transformer to the canvas, connect the AttributeRenamer to the Supplier input port and connect the AttributeCreator_2 to the Requestor input port. In the Parameters:
- Join On:
- Requestor: fme_feature_type
- Supplier: fme_feature_type
- Merge Parameters:
- Feature Merge Type: Attributes Only
- Reject Null and Missing Keys: No
- Attribute Accumulation:
- Accumulation Mode: Merge Supplier
- Conflict Resolution: Use Requestor
- Ignore Nulls: Yes
9. Writing to IFC
Add a writer to the canvas:
- Format: Industry Foundation Classes (IFC)
- Dataset: <browse to a folder location>\CAD_to_IFC_output.ifc
The deprecated IFC (STEP/XML) format is still present in the formats list and will not work for this tutorial. Ensure the (IFC) format is selected.
In the Feature Type dialog, set:
- IFC Element Type Name: BuildingStorey
Next, duplicate the BuildingStorey feature type by right-clicking on it and selecting Duplicate.
Rename the duplicated write feature type to:
- IFC Element Type Name: Space
Finally, connect the AttributeCreator to the BuildingStorey feature type and the Merged port from the FeatureMerger to the Space feature type.
Results in IFC
Here is the result when viewed in FME Data Inspector.
Data Attribution
Data was obtained from an Autodesk Revit sample and converted using FME.