If your shop uses SolidWorks and your supplier’s shop uses Inventor, at some point you will end up comparing notes on batch DXF export. Both platforms flatten sheet metal and write DXF files. Both can be automated. The workflows look similar from a distance and differ substantially in the details that matter for production pipelines.
This is a comparison of the actual automation approaches, not marketing specs. Platform capabilities are drawn from the COM API (SolidWorks) and the ObjectModel/iLogic API (Inventor).
What “Batch DXF Export” Actually Means
For context: batch DXF export in the sheet metal context means iterating through an assembly, finding every sheet metal component, generating a flat pattern for each, and writing a DXF file with the cut contour and bend lines in specific layers. The goal is files that go directly to laser or waterjet cutting — no manual intervention per part.
Both SolidWorks and Inventor offer this. Neither makes it entirely trivial.
SolidWorks: Export at the Part Level, Assembly Iteration in Code
SolidWorks’s DXF flat pattern export is built into the part context. A sheet metal part knows how to flatten itself, and you can trigger export directly without creating a drawing:
// ExportFlatPatternView — the primary method for DXF flat pattern export
// swFlatPatternOptions_e controls what gets exported
int options = (int)swFlatPatternOptions_e.swFlatPatternOption_ExportBendLines |
(int)swFlatPatternOptions_e.swFlatPatternOption_ExportBoundingBox;
bool result = swPart.ExportFlatPatternView(
outputPath, // full path including .dxf extension
options,
null // configuration name (null = active)
);
For assembly-level batch export, you walk the assembly tree yourself:
void ExportAssemblyFlatPatterns(AssemblyDoc swAssy, string outputDir)
{
foreach (Component2 comp in swAssy.GetComponents(false))
{
ModelDoc2 compDoc = comp.GetModelDoc2();
if (compDoc == null || compDoc.GetType() != (int)swDocumentTypes_e.swDocPART)
continue;
PartDoc part = (PartDoc)compDoc;
BodyFolder sheetMetalFolder = GetSheetMetalFolder(part);
if (sheetMetalFolder == null) continue; // not a sheet metal part
string outPath = Path.Combine(outputDir, comp.Name2 + ".dxf");
part.ExportFlatPatternView(outPath, options, null);
}
}
The assembly traversal is your responsibility. SolidWorks provides the per-part export; the iteration logic is yours to write. This is covered in more depth in how to batch export DXF files from a SolidWorks assembly.
One practical implication: if the same part appears multiple times in an assembly (repeated fastener plates, symmetric flanges), your code needs to track what it has already exported or you’ll overwrite the file multiple times. comp.GetPathName() gives you the file path to deduplicate against.
Inventor: Flat Pattern Exists on the Part, Export Requires DataIO
Inventor’s architecture is different. The flat pattern is a configuration-like object (FlatPattern) that exists as a child of the part’s component definition. Exporting it to DXF goes through the DataIO interface, not a dedicated ExportFlatPattern method:
' iLogic / VBA — export a flat pattern from an open part document
Dim oPart As PartDocument
Dim oFlatPattern As FlatPattern
oFlatPattern = oPart.ComponentDefinition.FlatPattern
Dim oDataIO As DataIO
oDataIO = oPart.ComponentDefinition.DataIO
' Configuration string format: operation keyword followed by key=value pairs
Dim sConfig As String
sConfig = "FLAT PATTERN DXF;" & _
"AcadVersion=2013;" & _
"OuterProfileLayer=CUT;" & _
"BendUpLayer=BEND-UP;" & _
"BendDownLayer=BEND-DOWN;" & _
"SimplifySplines=1;" & _
"SplineTolerance=0.01"
oDataIO.WriteDataToFile sConfig, "C:\Output\part.dxf"
The entire export configuration is passed as a semicolon-delimited string. This is the DataIO pattern — effectively a command protocol. It works but it is unpleasant to maintain: the parameter names are undocumented in the main API reference and must be discovered through the FlatPatternConfigBuilder dialog or community sources.
For assembly-level iteration, you use the BOM view pattern:
Dim oBOM As BOM
Dim oBOMView As BOMView
oBOM = oAsm.ComponentDefinition.BOM
oBOMView = oBOM.BOMViews.Item("Parts Only")
For Each oRow As BOMRow In oBOMView.BOMRows
Dim oCompDef As ComponentDefinition
oCompDef = oRow.ComponentDefinitions.Item(1)
If oCompDef.Type = kPartComponentDefinition Then
Dim oPD As PartDocument
oPD = oCompDef.Document
If oPD.IsSheetMetal Then
' Export as above
End If
End If
Next
Inventor’s iteration through a “Parts Only” BOM view deduplicates automatically — you visit each unique part once. SolidWorks gives you every component instance including duplicates. Whether that is helpful or not depends on your naming convention.
Layer Control: Where the Platforms Diverge
This is the most practically significant difference for fabrication pipelines.
Inventor provides granular, named layer control through the DataIO string. You specify exactly which layer each geometry class goes to:
| Parameter | Controls |
|---|---|
OuterProfileLayer | Part outer contour |
InteriorProfilesLayer | Holes and interior cutouts |
BendUpLayer | Bend lines for up-direction bends |
BendDownLayer | Bend lines for down-direction bends |
TangentLayer | Tangent edges |
ArcCentersLayer | Arc center points |
FeatureProfilesLayer | Feature outlines (embosses, ribs) |
Each layer also accepts _LineType_, _LineWeight_, and _Color_ suffix parameters. You have direct control over the output without a secondary configuration file.
SolidWorks uses a DXF mapping file (.slddxfmap) that you create once through the UI (File > Save As > Options when saving a DXF) and then reference from the API. The mapping file assigns entity types to layers using a visual interface. From the export API you reference it via export options — you do not pass layer names inline:
// Assign the mapping file path before export
swApp.SetUserPreferenceStringValue(
(int)swUserPreferenceStringValue_e.swDxfMappingFile,
@"C:\Config\my_fab_layers.slddxfmap"
);
The significant complication: SolidWorks 2022 removed the default BEND layer. Prior to 2022, bend lines were exported to a layer named BEND automatically. After 2022, bend lines only appear in the DXF if you have an active mapping file that explicitly assigns them to a layer. Teams upgrading from 2021 to 2022 without knowing this shipped DXFs with missing bend lines to their laser operators.
If your pipeline was built on SolidWorks pre-2022 behavior, verify your mapping file includes a bend line assignment. The entity export settings that control this are in the DXF options dialog under Sheet Metal.
Spline Handling
Both platforms produce B-spline geometry for curved sheet metal profiles, and both need to simplify them for CNC equipment that does not support true splines.
Inventor exposes this directly in the DataIO string: SimplifySplines=1 replaces splines with polyline approximations, with SplineTolerance=0.01 controlling the chord-length deviation in document units.
SolidWorks handles spline simplification through the export options bitmap: swFlatPatternOptions_e.swFlatPatternOption_RemoveUnknownEntities removes entities the target DXF version cannot represent. The degree of simplification is less configurable — SolidWorks converts splines to polylines but the chord tolerance is not directly exposed in the API.
For parts with complex swept bends or formed features, Inventor’s explicit tolerance parameter gives you finer control over the tradeoff between output fidelity and CNC compatibility.
The Drawing Document Workaround in Inventor
One Inventor workflow creates a drawing document, places all flat pattern views side by side, and exports the entire drawing as a single DXF. This gives you all parts in one file — useful for laser operators who nest parts themselves.
' Create a hidden drawing document
Dim oDrwDoc As DrawingDocument
oDrwDoc = oApp.Documents.Add(kDrawingDocumentObject, , False)
' Place flat pattern view for each part
For Each oPart In sheetMetalParts
oDrwDoc.Sheets.Item(1).DrawingViews.AddBaseView(
oPart, oPosition, oScale, kFromLeftTopViewOrientation,
kFlatPatternDrawingViewType)
' Advance position for next view
oPosition.X = oPosition.X + viewWidth + spacing
Next
' Export the drawing
oDrwDoc.SaveAs(outputPath, SaveOptions.DxfOption, True)
SolidWorks has no direct equivalent. Multi-part DXF files from SolidWorks require creating a drawing, placing flat pattern views, and exporting — the same approach, but it is not the primary batch export path. The native ExportFlatPatternView API writes one file per part, always.
Where Each Platform Makes You Write Workarounds
SolidWorks workarounds needed:
- Assembly traversal and deduplication (no built-in “parts only” iteration)
- Confirming bend lines appear in output after the 2022 change
- Setting the mapping file programmatically before each export batch
- Handling the multi-body DXF export case —
ExportFlatPatternViewexports all bodies; per-body selection requires a different approach
Inventor workarounds needed:
- Discovering undocumented DataIO parameter names
- Handling the BOM view “Parts Only” name localization issue (the name varies by Inventor language, so scripts that rely on it by name break in non-English installs)
- Managing the INI file path dependency in the iLogic approach
- Assembly save state validation — parts with unsaved changes are skipped silently
Neither platform provides a clean, complete batch DXF pipeline out of the box. Both require code that handles edge cases the UI never surfaces: mirrored parts, multibody components, configurations, parts that were inserted as solids and converted to sheet metal after the fact.
API Philosophy Difference
The deeper architectural difference: SolidWorks’s flat pattern export is a first-class operation on a part document. You call ExportFlatPatternView directly on a PartDoc. Inventor’s export is a data serialization operation — you tell the DataIO subsystem to write a specific representation. This makes Inventor’s export more configurable but more fragile: the DataIO string format has no compile-time type safety, and errors in parameter names are silent.
For teams building maintainable automation, the SolidWorks approach is easier to wrap in typed helper methods. The comparison of SolidWorks COM add-in development vs Inventor’s modern .NET API covers the broader architectural trade-offs.
The SolidWorks VBA API meters trap applies equally to both platforms in cross-CAD pipelines — if you are reading dimension values from one system and passing them to the other, unit conversion is mandatory.
Practical Decision Points
If you are building a new DXF batch export pipeline and have a choice of platform:
- Inventor wins if you need fine-grained layer control (up-bend vs down-bend separation) without a secondary configuration file
- SolidWorks wins if you need straightforward per-part export integrated with an existing COM add-in or if the parts are already in SolidWorks format
- Both require custom code for the assembly traversal — there is no point-and-click batch export that handles all edge cases for production use
Tools like CadShift address this by handling the traversal, layer mapping, bend line normalization, and multi-body edge cases in a tested add-in, so the engineering team gets the files without writing and maintaining the export infrastructure.