If you work with sheet metal in SolidWorks, you have three realistic options for getting flat-pattern DXFs out at scale: write a VBA macro, buy PDMPublisher, or use CadShift. Each solves the same core problem — the repetitive manual export — but they sit at very different points on the complexity-vs-cost curve.

This is a buyers guide, not a pitch. The right tool depends on your shop’s specific situation.

The problem all three tools solve

The native SolidWorks workflow for DXF export does not scale. For one part, the right-click → Export to DXF/DWG route is fine. For an assembly with 40 sheet metal parts, you are looking at 30–45 minutes of clicking through the same dialog, checking flat patterns, setting file names, and ensuring consistent layer settings across every export. Miss a part and your laser operator finds out at the machine. A detailed walkthrough of what the manual process involves is in the batch DXF export guide.

The three tools described here each eliminate that process, but through different mechanisms.

VBA macros

What they are

A VBA macro runs inside SolidWorks via the built-in macro editor (Tools → Macros → Run). The batch export pattern typically works like this: open each part in an assembly tree, check for a FlatPattern feature, call ExportFlatPatternView with a set of option flags, close the part, repeat.

The SolidWorks API documentation covers the core methods. The community at the SolidWorks forums and CodeStack has published working skeletons that most engineers start from.

Where macros work well

  • Your assembly structure is consistent: all sheet metal, no multi-body weldments, no suppressed configurations.
  • You only need DXF geometry — no bend lines on specific layers, no metadata in the file name beyond a simple part number.
  • You have someone on your team who can maintain the code when SolidWorks changes something in a new release.
  • Your budget is zero.

Where macros break

Multi-configuration parts. When a part has multiple configurations and different flat patterns per configuration, ExportFlatPatternView uses whichever configuration happens to be active at call time. Getting the right configuration into the filename and into the flat pattern requires extra logic that most macro examples omit.

Non-sheet-metal thin parts. Laser shops frequently cut flat plates modelled as solid bodies — no sheet metal features, no FlatPattern feature. The standard API approach misses these entirely. You need a separate code path that detects IBody2 objects thinner than a threshold and exports from a face instead.

Layer mapping. The DxfOutputDataTypes_e bitmask controls which entities (outline, bend lines, sketches, hidden edges) land in the export, but it does not control which layer each entity goes to. Layer assignment requires setting DXF export options on the part via SetUserPreferenceStringValue, which is per-session and does not persist. Your macro has to set these options, export, then potentially restore them — and there is no documented way to set per-layer colour in the macro itself. This is described in more detail in the DXF entity export settings post.

Metadata embedding. DXF files have limited native support for non-geometric metadata. Encoding material, thickness, and part number into the file beyond the filename requires writing to DXF comment fields (XDATA blocks in the DXF spec), which the SolidWorks API does not expose. The common workaround is to encode everything in the filename and maintain a sidecar CSV, which only works as long as your naming convention holds.

Error handling. A macro that hits a FlatPattern suppressed by a configuration, or a part with a rebuild error, will often throw a COM exception and stop. Building fault-tolerant traversal that logs failures and continues is a significant amount of code most shops never write.

Cost and maintenance overhead

Free to write, but not free to run. Every SolidWorks major release can break a macro. Decompiled interop assemblies reveal that ISldWorks::ExportFlatPatternView has changed internal behaviour at least twice in the last three major releases — parameter handling and silent failure modes differ across versions. Budget one to two days per year to maintain a reasonably complex macro.


PDMPublisher

PDMPublisher is a SolidWorks add-in developed by Blue Byte Systems (Amen Jlili, Vancouver). It runs as a standalone add-in inside SolidWorks and optionally as a task inside SolidWorks PDM Professional.

How it works

PDMPublisher is configured through a visual interface that defines an export job: target folder, naming pattern (can reference custom properties and PDM card variables), file formats (DXF, PDF, STEP, IGES, Parasolid, DWG, eDrawings, HTML), and optional filters. The tool walks the assembly reference graph and processes every component it finds according to those settings.

For flat patterns specifically, PDMPublisher offers a one-click “Export sheet metal parts to 1:1 flat pattern DXF” option. PDFs can be merged with a BOM and custom annotations placed at the assembly level.

Where PDMPublisher fits

PDM Professional shops. PDMPublisher’s strongest capability is as a PDM task: triggered from a workflow transition (e.g., when a file moves from “In Review” to “Released”), it can automatically export DXFs and PDFs and commit them back to the vault. If you are running PDM Pro and want exports to happen on a workflow event without human intervention, PDMPublisher is the best tool for that.

Multi-format output requirements. If your process requires DXF + PDF + STEP all in one operation from the same assembly, PDMPublisher handles this in a single job. Most VBA macros handle one format at a time.

Naming from PDM card variables. Custom properties in PDM cards can be injected into file names directly from the PDMPublisher configuration. This is a meaningful advantage for shops where revision, drawing number, and material are tracked in PDM rather than in the SolidWorks file itself.

Limitations to understand

Price point. Individual licenses run $799/year. Small team (2–4 seats) is $699/year per seat. There is a free Community tier with limited functionality. For comparison, a typical sheet metal engineering seat of SolidWorks Standard runs ~$4,000/year; adding PDMPublisher at $799/year is a 20% licence cost increase. For a two-person team, you are looking at $1,398/year just for export automation.

PDM task licensing is vault-scoped, not user-scoped. The PDM task version is licensed per vault, not per seat. This is a meaningful distinction: a shop with one vault and ten users pays once for the task, but the standalone add-in (which works without PDM) is priced per seat.

Bend line handling is basic. PDMPublisher exports flat patterns at 1:1 scale with standard entity export settings. The bend line trimming — cutting bend lines exactly to the part boundary rather than extending them past the edge — is not a configurable option. For laser shops that etch bend lines directly (the laser reads the DXF bend line as a score pass), untrimmed bend lines can cause scoring errors at part corners.

No thin part detection. Parts modelled as solid bodies (flat plates, gears, brackets) without a FlatPattern feature are not included in flat pattern exports. They need to be handled separately.


CadShift

CadShift is a SolidWorks add-in built specifically for the sheet metal to fabrication handoff. Its primary focus is batch DXF export from assemblies, with deeper control over the details that fabricators actually care about.

How it works

CadShift runs as an in-process add-in. From the CadShift toolbar, a single click opens the batch export panel. The tool traverses the assembly tree, identifies sheet metal parts and non-sheet-metal thin parts, and exports DXFs according to a saved configuration profile. The entire process for a 50-part assembly takes seconds.

Where CadShift adds value beyond the alternatives

Bend line trimming. CadShift trims bend lines to the flat pattern boundary before writing them to DXF. When a laser cutter reads DXF bend lines as a score pass, untrimmed lines that extend past the part edge create scoring arcs outside the cut boundary — a known problem on parts with corner reliefs and narrow flanges. This is handled automatically, not as a configuration option you can forget to enable.

Non-sheet-metal thin part detection. Solid body parts below a configurable thickness threshold (set per export profile) are included in the batch and exported via face selection rather than FlatPattern. A flat gear, a logo plate, or a laser-cut bracket shows up in the output without a separate manual step. The workflow implications for mixed assemblies are covered in the what fabricators need from DXF files post.

BOM formula engine with metadata embedding. Custom property values — part number, material, thickness, finish, quantity — can be composed into file names using a token system ({PartNumber}_{Material}_{Thickness}mm), embedded as attributes in the DXF, and included in PDF output with a BOM table. This is the piece that matters when your laser shop or waterjet house needs to identify a part without calling you.

Price. Basic tier is $199/yr per seat. Professional is $799/yr per seat. For a two-person team it is $398–1,598/year total, versus $1,398/year for PDMPublisher at the small team rate.

Works without PDM. CadShift operates as a standalone add-in with no PDM infrastructure required. For the large proportion of SolidWorks shops that do not run PDM Professional, this is the practical path.

Where CadShift is not the right choice

If your process is tightly coupled to PDM workflow transitions — you need exports to trigger automatically when a part reaches “Released” state — PDMPublisher’s PDM task integration is a better fit. CadShift runs from a manual trigger inside SolidWorks; it does not hook into PDM workflow events.


Comparison summary

VBA MacroPDMPublisherCadShift
CostFree$799/seat/yr$199/yr per seat–$799/yr per seat
PDM integrationNoneDeep (task + vault)None
Flat pattern DXFManual APIYesYes
Non-sheet-metal partsExtra code requiredNoYes
Bend line trimmingManual code requiredNoYes
Metadata in filenameVia macro logicVia card variablesToken-based
BOM + PDF outputNoYesYes
Maintenance burdenHighLowLow
Requires PDM ProNoNo (standalone) / OptionalNo

Which to choose

VBA macros make sense if your assembly structure is predictable and simple, you have the API knowledge to maintain the code, and your budget is zero. The edge cases do not apply to your workflow. For a shop running 20 identical parts with consistent configurations and no thin bodies, a well-written macro will serve you for years.

PDMPublisher makes sense if you are already running PDM Professional and want export automation tied to workflow state changes. The price per seat is significant, but the vault-scoped PDM task licensing means a large team can share the cost. If you need multi-format output (DXF + PDF + STEP) in one operation triggered by a vault transition, this is the tool.

CadShift makes sense for the majority of sheet metal shops that do not run PDM, want bend line trimming and thin part detection without writing code, and need the cost to stay close to zero. The in-process vs standalone API comparison explains why an in-process add-in handles edge cases that standalone tools and macros cannot — assembly context, suppressed components, and multi-body parts all behave differently inside the SolidWorks process boundary.

If you are currently maintaining a VBA macro and hitting the multi-config or thin-part edge cases, either PDMPublisher or CadShift is a straightforward upgrade. The question is whether you need PDM workflow integration or not.