You receive a STEP file from a supplier or another team. It opens in SOLIDWORKS as an assembly with hundreds of sub-components. Some of them are clearly bent sheet metal parts—brackets, enclosure panels, mounting clips. Your goal is to get flat-pattern DXF files for the laser shop.
When you right-click a component and look for Flat Pattern, it’s not there. SOLIDWORKS treats every STEP-imported body as a dumb solid: geometry only, no feature tree, no bend data, no flat pattern. Even if the body was originally modeled as sheet metal, none of that intelligence survives the STEP format.
This post covers the complete workflow: identify which bodies need reconstruction, use Convert to Sheet Metal to add sheet metal intelligence back, and batch-export the resulting flat patterns as DXF files.
Why STEP Doesn’t Carry Sheet Metal Data
STEP (ISO 10303) stores geometry as boundary representation — faces, edges, and vertices in 3D space. It does not store feature history, bend parameters, K-factors, or flat-pattern data. When SolidWorks exports a sheet metal part to STEP, it writes the folded 3D geometry. When another tool imports that STEP, it sees a solid body with a bend in it. The bend angle is implicit in the face geometry; the bend radius and K-factor are gone.
This is different from native SolidWorks files, where the feature tree includes Base-Flange, Miter Flange, and Flat-Pattern features that SolidWorks can suppress to produce the flat state. There’s no equivalent in STEP. The information doesn’t exist.
The consequence: you can’t right-click an imported STEP part and ask for a flat pattern. You must reconstruct the sheet metal feature structure from the 3D geometry before SOLIDWORKS can generate one.
For a small number of parts this is a tolerable manual process. For an assembly with dozens or hundreds of bent-plate components, you need a systematic approach.
Phase 1: Triage — Identify Which Parts Need Rebuild
Not every component in a STEP assembly needs a flat pattern. Machined parts, castings, extrusions, and hardware don’t need one. Only uniform-thickness sheet metal parts that will be cut and bent need reconstruction.
The fastest triage is visual, but for large assemblies you need something more systematic.
Manual Visual Triage
Open each suspect component. In the FeatureManager, you’ll see either:
Import1— a single imported body feature. This is a dumb solid. If it looks like a bent plate, it needs reconstruction.- Existing sheet metal features (
Base-Flange1,Flat-Pattern1, etc.) — the part is already native sheet metal. These may unfold immediately if the supplier included them. - A mix of import features and cuts — still a dumb solid; the cuts were added after import.
Filter quickly: in the assembly, right-click each component → Open Part. Check the FeatureManager. Any part showing only Import1 and no sheet metal features is a candidate.
Automated Triage via VBA
For assemblies with 50+ components, iterate programmatically. This macro opens each component, checks whether it has a SM-FlatPattern feature type, and records which parts need rebuild:
Sub TiageAssemblyForSheetMetal()
Dim swApp As SldWorks.SldWorks
Dim swAssy As SldWorks.AssemblyDoc
Dim swComp As SldWorks.Component2
Dim swCompPart As SldWorks.ModelDoc2
Dim vComps As Variant
Dim i As Long
Set swApp = Application.SldWorks
Set swAssy = swApp.ActiveDoc
vComps = swAssy.GetComponents(False) ' False = all levels flat
Dim needsRebuild() As String
Dim count As Long
For i = 0 To UBound(vComps)
Set swComp = vComps(i)
Set swCompPart = swComp.GetModelDoc2
If swCompPart Is Nothing Then GoTo NextComp
If swCompPart.GetType <> swDocPART Then GoTo NextComp
Dim feat As SldWorks.Feature
Dim hasSheetMetal As Boolean
hasSheetMetal = False
Set feat = swCompPart.FirstFeature
Do While Not feat Is Nothing
If feat.GetTypeName2 = "SM-FlatPattern" Then
hasSheetMetal = True
Exit Do
End If
Set feat = feat.GetNextFeature
Loop
If Not hasSheetMetal Then
' Check if it looks like a solid that might be sheet metal
' (any ImportedBodyFeature present = dumb STEP solid)
Dim hasDumbImport As Boolean
hasDumbImport = False
Set feat = swCompPart.FirstFeature
Do While Not feat Is Nothing
If feat.GetTypeName2 = "ImportedBodyFeature" Then
hasDumbImport = True
Exit Do
End If
Set feat = feat.GetNextFeature
Loop
If hasDumbImport Then
ReDim Preserve needsRebuild(count)
needsRebuild(count) = swCompPart.GetPathName
count = count + 1
End If
End If
NextComp:
Next i
' Output to Immediate Window
Dim j As Long
For j = 0 To count - 1
Debug.Print needsRebuild(j)
Next j
MsgBox count & " parts need sheet metal reconstruction. Check Immediate Window for paths."
End Sub
This gives you a list of STEP-imported parts that have no sheet metal features — your rebuild queue. Review it manually to exclude castings and machined parts that happen to be imported solids too. Thickness is the separator: a part with a consistent wall thickness across its faces is sheet metal; a machined part with varying cross-sections is not.
Phase 2: Convert to Sheet Metal on Imported STEP Solids
Open a dumb-solid STEP part. The body is a solid with bent faces. You need to tell SolidWorks which face is the fixed reference, which edges are bends, and what the K-factor should be.
The UI Workflow
Insert → Sheet Metal → Convert to Sheet Metal
The PropertyManager presents four input sections:
Sheet Metal Gauges — set thickness and bend radius. For STEP imports, you must measure the body’s wall thickness manually (right-click a flat face → Measure, or use Tools → Measure) and enter it here. K-factor is typically 0.38–0.5 depending on material and supplier spec.
Fixed Face — select one flat face as the base. This face stays in position during unfolding. Choose the largest face on the base flange.
Rip Edges — STEP bodies often have closed corners where the material overlaps. Select these edges to tell SolidWorks to cut the corner so the flat pattern can unfold. Common locations: where two flanges meet at 90°.
Bend Edges — select every edge that represents a bend. SolidWorks infers the bend from the cylinder face between adjacent flat faces. For most simple bends you can leave this empty and let SolidWorks detect them automatically; for complex geometry, select manually.
After Convert to Sheet Metal completes, the FeatureManager shows SheetMetal1, Base-Flange1, and Flat-Pattern1. Right-click Flat-Pattern1 and Unsuppress — the part unfolds. If the flat dimensions don’t match your supplier’s drawing, the K-factor is wrong; edit SheetMetal1 to adjust.
What Fails and Why
Geometry that won’t convert:
- Bodies with non-uniform wall thickness (varying cross-sections). The tool requires constant thickness.
- Bodies with compound curvature (doubly-curved surfaces). These can’t be unfolded via the sheet metal feature — you’d need lofted bends or a surface-flatten workflow instead. The SolidWorks curved sheet metal workflow covers this scenario.
- Bodies with internal features (ribs, bosses, counterbores). These are machined parts, not sheet metal.
Rip edge failures: If the part has a closed corner that requires a zero-gap rip, the Convert feature sometimes fails with “Unable to thicken geometry.” Add a tiny sketch cut (0.05 mm slot) at the corner before running Convert to Sheet Metal.
K-factor mismatch: The flat pattern produces incorrect dimensions because the K-factor doesn’t match the real bend allowance used during fabrication. This is the same problem as importing any STEP with bends — STEP files can’t carry K-factor data, so you must enter the correct value from your shop’s specs or material standard.
API Alternative: InsertConvertToSheetMetal2
For batching the conversion across multiple parts, you can drive the Convert to Sheet Metal command via the API. The method is IFeatureManager.InsertConvertToSheetMetal2:
Sub ConvertImportedBodyToSheetMetal(swPart As SldWorks.PartDoc, _
fixedFace As SldWorks.Face2, _
thickness As Double, _
kFactor As Double, _
bendRadius As Double)
Dim swFeatMgr As SldWorks.FeatureManager
Dim swFeat As SldWorks.Feature
Set swFeatMgr = swPart.FeatureManager
' Select the fixed face first
Dim swFaceEnt As SldWorks.Entity
Set swFaceEnt = fixedFace
swFaceEnt.Select4 True, Nothing
' InsertConvertToSheetMetal2 signature (SOLIDWORKS 2021+):
' Face, Thickness, ReverseThickness, BendRadius, KFactor,
' EdgeTypeArr, BendEdgeArr, GapArr,
' OverrideRelief, ReliefType, ReliefWidth, ReliefDepth, AutoRelief,
' TreatFacesAsBends, FaceArr, CornerTreatType
Set swFeat = swFeatMgr.InsertConvertToSheetMetal(fixedFace, _
thickness, False, bendRadius, kFactor, _
Empty, Empty, Empty, _
False, swSheetMetalReliefType_e.swSheetMetalReliefTypeRectangle, _
0.001, 0.001, True, _
False, Empty, swCornerType_e.swCornerButtOpen)
If swFeat Is Nothing Then
Err.Raise vbObjectError, , "Convert to Sheet Metal failed — check geometry for non-uniform thickness or compound curves."
End If
' Rebuild to generate flat pattern
swPart.EditRebuild3
End Sub
The practical limitation: you need to programmatically select the fixed face and rip edges, which requires either hardcoded selection logic or a pre-processing step where you identify the largest planar face. For bulk processing with varied geometry, UI-assisted conversion per part is usually faster than writing a fully automated selector.
Phase 3: Batch Flat-Pattern DXF Export
Once your parts have native sheet metal features, export the flat patterns. The basic options:
Manual Export
Right-click Flat-Pattern1 → Export to DXF/DWG. In the export dialog:
- Sheet Metal option enabled
- Geometry — the flat outline
- Bend Lines — fold indicators for the laser/punch operator
- Bounding Box — optional but useful for nesting software
This works for individual parts. For batch export across a rebuilt assembly, use the API.
Batch Export Macro
This macro iterates all components in the open assembly, finds parts with Flat-Pattern1 features, and exports each to DXF in a subfolder:
Sub BatchExportFlatPatterns()
Const OUT_FOLDER As String = "DXF"
Dim swApp As SldWorks.SldWorks
Dim swAssy As SldWorks.AssemblyDoc
Dim vComps As Variant
Dim i As Long
Set swApp = Application.SldWorks
Set swAssy = swApp.ActiveDoc
vComps = swAssy.GetComponents(False)
Dim assyDir As String
assyDir = Left(swAssy.GetPathName, InStrRev(swAssy.GetPathName, "\"))
Dim outDir As String
outDir = assyDir & OUT_FOLDER & "\"
If Dir(outDir, vbDirectory) = "" Then MkDir outDir
Dim exported As Long
For i = 0 To UBound(vComps)
Dim swComp As SldWorks.Component2
Dim swPart As SldWorks.PartDoc
Set swComp = vComps(i)
Set swPart = swComp.GetModelDoc2
If swPart Is Nothing Then GoTo NextComp
If swPart.GetType <> swDocPART Then GoTo NextComp
' Check for flat pattern feature
Dim feat As SldWorks.Feature
Set feat = swPart.FirstFeature
Dim hasFlatPattern As Boolean
hasFlatPattern = False
Do While Not feat Is Nothing
If feat.GetTypeName2 = "SM-FlatPattern" Then
hasFlatPattern = True
Exit Do
End If
Set feat = feat.GetNextFeature
Loop
If Not hasFlatPattern Then GoTo NextComp
' Build output path
Dim partName As String
partName = swComp.Name2
Dim outPath As String
outPath = outDir & partName & ".dxf"
Dim modelPath As String
modelPath = swPart.GetPathName
' Export using sheet metal mode
' swExportToDWG_ExportSheetMetal = 4
Dim sheetMetalOpts As Long
sheetMetalOpts = SheetMetalOptions_e.ExportFlatPatternGeometry + _
SheetMetalOptions_e.ExportBendLines
Dim bRet As Boolean
bRet = swPart.ExportToDWG2(outPath, modelPath, _
swExportToDWG_e.swExportToDWG_ExportSheetMetal, _
True, Empty, False, False, sheetMetalOpts, Empty)
If bRet Then
exported = exported + 1
Else
Debug.Print "Export failed: " & partName
End If
NextComp:
Next i
MsgBox "Exported " & exported & " flat patterns to " & outDir
End Sub
The ExportToDWG2 call with swExportToDWG_ExportSheetMetal action uses the sheet metal flat-pattern engine rather than the drawing view projection engine. This is the correct mode for flat patterns — using swExportToDWG_ExportDrawing on a flat-pattern drawing view gives you the projection geometry, which works but requires an open drawing document and introduces extra steps.
For assemblies with many configurations or multi-body sheet metal parts, the batch DXF export guide covers the configuration-aware export approach and how CadShift handles multi-body parts where each body has its own flat pattern.
When to Skip Rebuild
Not every part in a STEP assembly needs flat-pattern DXF output. Skip the reconstruction for:
- Purchased hardware — fasteners, bearings, seals. These are in the STEP for reference geometry only.
- Machined parts — if a part has variable wall thickness, pockets, or bosses, it’s not sheet metal.
- Structural extrusions — aluminum profiles, steel channels. These are cut to length, not bent from flat stock. They don’t have flat patterns.
- Castings — complex organic geometry that will never be cut from sheet.
For a 130-component STEP assembly, it’s common to end up with 20–40 parts that genuinely need flat patterns and 90+ that don’t. The triage macro above isolates the candidates; visual review confirms which of those candidates are real sheet metal.
The Net Result
Working through a large STEP assembly with this workflow produces a folder of DXF files, one per sheet metal part, each with the correct flat geometry and bend lines. The files are ready for the laser table or punch press without additional editing.
The main time cost is the per-part conversion step — identifying the fixed face, rip edges, and verifying the flat pattern against supplier drawings. That’s manual judgment that can’t be fully automated. What you can automate is the triage (finding candidates) and the final DXF export (batch export macro above). The middle step — Convert to Sheet Metal itself — benefits from the UI for anything more complex than a simple L-bracket.
For shops that do this regularly on incoming supplier geometry, CadShift’s batch DXF export picks up from where the reconstruction ends: once parts have native sheet metal features, it handles the export loop, file naming, quantity tracking, and metadata embedding in a single operation.
As a final check, compare flat-pattern area × sheet thickness × material density against the STEP model’s mass (Tools → Mass Properties on the original import). Within a few percent means the conversion is correct. A large discrepancy means the K-factor is wrong or there’s a geometry issue worth investigating before sending to the shop floor. The STEP import K-factor problem goes deeper into why this mismatch happens and how to measure the correct bend allowance from physical samples.