Blog · Inventor · 1 Oct 2026 · 3 min read

How to get a flat pattern from a STEP solid in Inventor with the API

A bent plate from a STEP file is a dumb solid with no sheet-metal data. The four API lines that turn it into a sheet-metal part and unfold it, the test that tells a real bend from a flat plate, and the flat view that silently draws the folded part instead.

Short answer: set the part's SubType to the sheet-metal GUID, turn off style thickness, set the measured thickness in centimetres, and call Unfold(). Then test the result: Unfold() "succeeds" on flat plates too, and Inventor draws the folded part without a word if there is no flat pattern.

The recipe

oPart.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"   ' becomes a sheet-metal part
Dim oSM As SheetMetalComponentDefinition = oPart.ComponentDefinition
oSM.UseSheetMetalStyleThickness = False
oSM.Thickness.Value = thicknessCm                            ' measured, in cm
oSM.Unfold()
Try : oSM.FlatPattern.ExitEdit() : Catch : End Try            ' back to the folded model

Run it on a copy of the body in a new part, never on the client's file: splitting a STEP multi-body into part files.

ExitEdit() matters: without it the model stays in flat pattern mode.

There is no thickness in the STEP

No API returns the thickness of a solid. It has to be measured. Autodesk's own approach casts a ray from the largest planar face (SurfaceBody.FindUsingRay). Volume divided by the largest face works only on plates: three different parts all came out at exactly 7.77 mm. In our process the register wins, and the register value is checked against the drawing: plate thickness from a STEP file.

Is it really bent? Compare the bodies

Unfold() returns without error on a flat plate. To know whether the part is bent, compare the folded body with the flat body. If they are identical, it was never bent:

Dim oColl As ObjectCollection = oApp.TransientObjects.CreateObjectCollection()
oColl.Add(oSM.SurfaceBodies.Item(1))
oColl.Add(oSM.FlatPattern.SurfaceBodies.Item(1))
Dim oIdent As ObjectCollection = oApp.TransientBRep.GetIdenticalBodies(oColl)
If oIdent.Count > 0 Then isBent = False

Do not rely on HasFlatPattern = True. It is true after any unfold.

Another way to find bends in the geometry: a bend is a pair of coaxial cylinders whose radii differ by the thickness. Radii 25 and 35 on a 10 mm plate is a bend. Radii 3.5 and 7 on an 8 mm plate are fillets.

On one job: 150 parts converted, 149 DXF files, 2 bent plates, 147 flat.

Flat pattern DXF

oSM.DataIO.WriteDataToFile("FLAT PATTERN DXF?AcadVersion=R12", sDxfPath)

The flat view in the drawing

Add the base view with SheetMetalFoldedModel = False in the options. Two traps:

Enum values from VBScript

VBScript has no Inventor enums. Read the values from the interop assembly, do not guess them: planar surface 5890, cylinder 5891, kTopViewOrientation 10754, kFrontViewOrientation 10764.

In iLogic, Format(...) resolved to System.Enum.Format and failed. Use (value).ToString("0.00").

Do and don't

Do

Don't

Questions people ask

Can an AI agent unfold hundreds of STEP parts? Yes, in one rule. The agent then checks how many came out bent and looks at those drawings one by one, because they are few and they are the risky ones.

What about rolled or curved plates? They are not bent plates. They need their own treatment and usually a person's decision.