The SOLIDWORKS sheet metal environment has two entry points: you either start with a sketch and build the part as sheet metal from the beginning, or you convert an existing solid into a sheet metal body. The second path—Convert to Sheet Metal—is the right tool for STEP imports and inherited legacy parts with no sketches. But it fails silently on a specific class of solid bodies, and understanding why matters both for fixing production parts and for writing API macros that won’t break on edge cases.

When Convert to Sheet Metal Works

Convert to Sheet Metal (Insert → Sheet Metal → Convert to Sheet Metal) takes a uniform-thickness solid body and adds the sheet metal intelligence retroactively. It produces two features in the FeatureManager tree: a Sheet-Metal feature that owns the thickness, K-factor, and bend allowance rules, and a Convert-Solid feature that references the fixed face and the rip edges.

The canonical use cases are:

Imported STEP/IGES bodies. When a fabricator sends you a formed part as a STEP file, you get an ImportedBodyFeature with no history. There are no sketches to build a Base Flange from. Convert to Sheet Metal is the only path to a flat pattern—it inspects the solid, identifies bend regions, and unfolds via the sheet metal kernel. See the large STEP file sheet metal rebuild workflow for how to triage a multi-body assembly where only some parts need this treatment.

Inherited legacy parts with no sketches. A file opened from another user that shows only Solid Body1 in the feature tree. The geometry is correct; the parametric history is gone. Convert to Sheet Metal is the only option short of full reconstruction.

In both cases, the solid must have uniform wall thickness. That is the non-negotiable precondition.

What Breaks Convert to Sheet Metal

The IFlatPattern::Status property returns a value from the swFlatPatternStatus_e enum (defined in SolidWorks.Interop.swconst.dll). The failure mode you will hit most often on converted bodies is swFlatPatternStatusVariableThickness. This is what underlies the opaque “sheet metal feature failed” message that appears when you try to unfold.

Solids built with the Thicken feature (including Surface Extrude → Thicken)

The Thicken command creates a solid by offsetting a surface body. A common variant is: sketch a profile → Surface Extrude to create a zero-thickness surface body → Thicken to give it wall thickness. This chain is a natural way to build curved shapes, but it is invisible to the Convert to Sheet Metal engine.

If the source surface has any curvature, the inside and outside offset distances differ—meaning the resulting solid has slightly variable thickness as measured normal to the actual faces. The Convert to Sheet Metal precondition check measures thickness by sampling a small set of parallel-face pairs and rejects the body if the variation exceeds a tolerance.

Parts built this way look visually uniform but fail the sampler. The Status property returns swFlatPatternStatusVariableThickness immediately on feature creation. The only fix is to rebuild the part as a Base Flange part—the Thicken solid cannot be patched into a valid sheet metal tree. If the original sketch still exists in the FeatureManager, the shared-sketch rescue workflow below can reuse it directly.

Non-uniform post-process geometry

Chamfers or fillets applied to the wall face after the initial body creation change the local wall thickness. A 1mm chamfer on a 3mm-wall part leaves a 2mm edge: the Convert to Sheet Metal engine sees both 3mm and 2mm regions and refuses to commit to either.

Zero-gap closed corners

When a body’s edges meet flush with no gap, the rip-edge picker has nothing to grip. The workaround before converting is a small sketch cut—a 0.05mm slot at each closed corner—to give the tool a rip edge to assign.

The fixed face reference fragility

InsertConvertToSheetMetal2 stores the fixed face by its internal face ID. If you later edit the solid’s profile sketch, the body rebuild may reassign face IDs, and the fixed face reference becomes invalid. The flat pattern then shows a red ! with “Please reselect the fixed face.” The API equivalent is ISheetMetalFeatureData.FixedFace—get and set—but the set only takes effect if the new face passes the thickness precondition check.

The Base Flange Path: Direct Modeling from Scratch

When building a sheet metal part from a drawing or when the design starts in CAD rather than from an imported solid, Base Flange + Sketched Bends is the right approach. This is the InsertSheetMetalBaseFlange2 path via the API.

The feature tree it produces:

Sheet-Metal1          ← thickness, K-factor, bend allowance owned here
Base-Flange1          ← the 2D profile, extruded as sheet metal
Edge-Flange1          ← optional downstream flanges
Sketched-Bend1        ← explicit bend on a flat region
Flat-Pattern1         ← output: the unfolded body

The Sheet-Metal1 feature is the single source of truth for thickness. Every downstream feature—edge flanges, sketched bends, cut extrudes—inherits from it. There is no fragile fixed-face reference and no thickness sampler: the wall is always uniform by construction.

The Rescue Workflow: Shared Sketches

Here is the scenario where this pattern matters most: a solid built with Boss Extrude (Thin) → Convert to Sheet Metal fails after a design change. The original author built it as a thin extrude rather than using Base Flange, and post-change edits broke the fixed face reference. The flat pattern is now red.

The rescue does not require redrawing geometry. The original Sketch1 (the 2D profile) and Sketch2 (the bend lines) still exist in the FeatureManager tree, already fully dimensioned:

Step 1. Suppress or delete the Boss Extrude, Sheet-Metal, and Convert-Solid features. The sketches remain in the tree.

Step 2. Select Sketch1. Run Insert → Sheet Metal → Base Flange/Tab. SOLIDWORKS reuses the existing sketch as the profile. Set thickness and K-factor here.

Step 3. Select Sketch2 bend lines. Run Insert → Sheet Metal → Sketched Bend. Each bend line from the original sketch becomes a Sketched-Bend feature that references the shared sketch.

The sketches are shared: used first by the original Boss Extrude and now by Base Flange and Sketched Bends. No geometry is redrawn. The result is a clean native sheet metal tree with a proper Sheet-Metal1 feature owning all bend allowance parameters.

This is the pattern Kevin Chandler demonstrates on the SOLIDWORKS User Forum (SwYm community)—rescuing a solid-first workflow by re-parameterizing from the existing sketch geometry.

API: Detecting Which Path a Part Took

When writing a macro that needs to triage existing parts, check the feature type name:

Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swFeat As SldWorks.Feature

Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc

Set swFeat = swModel.FirstFeature()
Do While Not swFeat Is Nothing
    Dim typeName As String
    typeName = swFeat.GetTypeName2()
    
    Select Case typeName
        Case "BaseFlange"
            ' Native sheet metal — Base Flange path
        Case "SM-FlatPattern"
            ' Flat pattern feature found
        Case "ImportedBodyFeature"
            ' STEP/IGES import — may need Convert to Sheet Metal
        Case "SMConvert"
            ' Convert to Sheet Metal was used
    End Select
    
    Set swFeat = swFeat.GetNextFeature()
Loop

The relevant swFeatureNameID_e values from swconst.dll: swFmBaseFlange for the Base Flange path and swFmConvertToSheetMetal for the Convert path. Use GetTypeName2() rather than numeric IDs—the string representation is stable across versions.

API: Checking Flat Pattern Status

Before exporting a flat pattern DXF, check whether the flat pattern is actually valid:

Function GetFlatPatternStatus(swModel As SldWorks.ModelDoc2) As Long
    Dim swFeat As SldWorks.Feature
    Set swFeat = swModel.FirstFeature()
    
    Do While Not swFeat Is Nothing
        If swFeat.GetTypeName2() = "SM-FlatPattern" Then
            Dim swFP As SldWorks.FlatPatternFeatureData
            Set swFP = swFeat.GetDefinition()
            GetFlatPatternStatus = swModel.Extension.GetLastError()
            Exit Function
        End If
        Set swFeat = swFeat.GetNextFeature()
    Loop
    
    GetFlatPatternStatus = -1 ' no flat pattern found
End Function

The swFlatPatternStatus_e values to handle explicitly:

  • swFlatPatternStatusOk = 0 — safe to export
  • swFlatPatternStatusVariableThickness = 1 — thickness mismatch; the Convert path failed
  • swFlatPatternStatusFlatPatternFailed = 2 — generic failure; check bend radius vs thickness ratio

A batch DXF export macro that skips this check will silently export whatever geometry is current—which on a failed flat pattern may be the 3D formed body rather than the unfolded sheet.

Export Action Matters: Action=1 vs Action=2

When calling IPartDoc.ExportToDWG2, the action parameter controls what gets exported:

  • Action = 0 (swExportToDWG_ExportSelectedFacesOrLoops): exports the selected face geometry directly. Requires a face in the selection manager. Used for multi-body flat pattern export where you select each body’s flat face individually.
  • Action = 2 (swExportToDWG_ExportSheetMetal): uses the sheet metal flat pattern engine. The alignment array parameter is silently ignored; orientation is controlled by the fixed face instead.

If your macro produces DXFs with unexpected orientation, this is usually why: Action=2 ignores the alignment array you passed and uses the fixed face normal. Switch to Action=0 with an explicit face selection to control orientation programmatically. The SolidWorks API DXF export VBA vs manual comparison covers this in detail.

Choosing the Right Path

Use Base Flange + Sketched Bends when:

  • You are creating the part in SolidWorks from scratch
  • Design intent (thickness, bend allowance) should be parametrically owned in one place
  • You expect future edits to the profile or bend geometry
  • You want a reliable batch export pipeline that won’t fail on variable-thickness errors

Use Convert to Sheet Metal when:

  • The starting point is an imported STEP/IGES body with no sketch history
  • The part is a legacy file where no parametric history exists
  • The solid truly has uniform wall thickness (verify with the Thickness Analysis tool before attempting)

When a Convert to Sheet Metal workflow fails due to Thicken-built geometry or fragile fixed-face references, the shared-sketch rescue path above gives you a clean Base Flange tree from the existing sketch geometry without redrawing anything.

The DXF to sheet metal: Base Flange vs Boss Extrude + Convert comparison goes deeper on the Boss Extrude (Thin) path specifically—where the initial solid is built as a thin extrude before conversion—and when that intermediate step is useful versus when it creates maintenance problems. For the five geometry patterns that will always fail the sheet metal modeler regardless of path, see when SolidWorks sheet metal can’t model your part.

Triage Checklist When Convert to Sheet Metal Fails

When InsertConvertToSheetMetal2 errors or IFlatPattern::Status returns non-zero, work through these in order:

  1. Check the feature type. Use GetTypeName2() to confirm the body is an ImportedBodyFeature or a solid body. If it’s already an SMConvert feature that failed, that’s different from a body that hasn’t been attempted yet.

  2. Run Thickness Analysis (Evaluate > Thickness Analysis). Set the nominal thickness and look for red regions. Any variation beyond ±0.01 mm on a 3 mm part typically triggers swFlatPatternStatusVariableThickness. Red regions on edges or near fillets are the usual culprits.

  3. Identify how the solid was built. If the feature tree shows a Surface Extrude + Thicken chain, or a Boss Extrude (Thin) on a curved profile, expect failure. The only path forward is the Base Flange rebuild—Convert to Sheet Metal cannot be made to work on variable-thickness geometry regardless of how the fixed face is set.

  4. Check for closed corners. Zoom into every internal corner where two faces meet flush. If there is no gap visible, add a 0.05 mm sketch cut at each corner to create rip edges before attempting Convert to Sheet Metal again.

  5. Check for chamfers and fillets on wall faces. Any chamfer or fillet that intersects the wall face (not just the edge cap) changes the local wall thickness at that location. Remove or suppress these before converting.

  6. If the body passes thickness check but Convert still fails, the fixed face selection may be referencing a planar face that is not perpendicular to the bend axis. Try a different fixed face—the planar end face of the part rather than a curved face.

If steps 1–6 are exhausted and the conversion still fails, the part requires a Base Flange rebuild. This is not a workaround—it is the correct outcome. A curved solid created with Surface Extrude + Thicken is not a sheet metal part; it’s a surface offset. Rebuilding it as a Base Flange part gives you correct bend allowance, a clean flat pattern, and a reliable DXF export pipeline.

If the curved body needs to be split into multiple sections for fabrication (each section separately flattenable), that introduces a different problem: the SOLIDWORKS Split feature destroys the flat pattern on all resulting bodies. The curved sheet metal split sections and flat pattern workflow covers the three approaches that preserve flattenability after sectioning.