SolidWorks API: 7 Things That Silently Fail (And How to Fix Them)

Every SolidWorks API developer has spent hours debugging a macro that produces no error, no exception, and completely wrong output. The SolidWorks COM API is old enough that many of its failure modes predate modern error handling conventions — methods that silently return Nothing, boolean flags that are ignored, and side effects that modify document state without warning. This is a catalogue of the seven most common ones. Each has a pattern, a root cause, and a fix. ...

5 June 2026 · 9 min · CadShift

SolidWorks API Meter Units Trap — Why SetSystemValue3 Ignores Document Units (and the Fix)

The SolidWorks API speaks one language for lengths: meters. Not millimeters. Not inches. Meters, always, regardless of what your document’s unit system displays. This sounds like something you’d learn in the first chapter of any SolidWorks API tutorial, and it is — yet it causes more silent macro failures than any other single issue. The problem is not that developers don’t know about it. The problem is that it bites you in a second way you didn’t expect, in a context you were already confident about. ...

3 June 2026 · 7 min · CadShift

When to Upgrade from a SolidWorks Macro to a Full Add-in

A SolidWorks macro gets you 80 percent of the way there. It can open files, traverse assemblies, read custom properties, save DXF, and close — all without writing a line of C#. The VBA IDE ships inside SolidWorks, the API reference is documented, and a working batch export macro can be running in an afternoon. Then the macro breaks in a way that a one-line fix will not solve. Or someone needs it on fifteen workstations, or the team wants a toolbar button, or the workflow needs to respond to file saves without being manually invoked. That is when engineers discover that “just adding a button” requires a complete architectural shift. Macros and add-ins are not on the same continuum — they differ at the design level, and the capabilities that matter most to production workflows sit entirely on the add-in side of that line. ...

1 June 2026 · 8 min · CadShift

When Your VBA Macro for DXF Export Isn't Enough — Edge Cases That Break Batch Workflows

A LinkedIn post earlier this year showed a VBA macro compressing a 40-minute manual batch DXF export down to seconds. It drew significant engagement because every SolidWorks engineer who works with sheet metal has written some version of this macro, or knows someone who has. The basic implementation is not complicated. Iterate assembly components, open each part, call ExportToDWG2, close. For clean assemblies with simple sheet metal parts and consistent filenames, it runs reliably. The problems surface when the assembly contains parts that don’t fit the happy path — and most production assemblies do. ...

12 May 2026 · 9 min · CadShift

How to Automate SolidWorks Drawing Creation with a Macro — And Why Task Scheduler Won't Do It

The request surfaces a few times a month on r/SolidWorks and in engineering Slack channels. Someone has two hundred parts. They need a drawing for each one. Same template, same three views, title block linked to the same properties. They want to leave it running overnight. The top replies say “use Task Scheduler” or “ask ChatGPT to write a macro” and the original poster comes back in a week saying neither worked. ...

23 April 2026 · 11 min · CadShift

Why Engineers Are Using ChatGPT for SolidWorks Macros — And Where It Still Fails

Engineers are feeding SolidWorks tasks to ChatGPT, Copilot, and Claude and getting working VBA macros back — sometimes. A Reddit post showing a ChatGPT-generated STL export macro pulled 26 upvotes. A separate thread about building an MCP server for the SolidWorks API drew 15 comments. The interest is real, and for good reason: writing a SolidWorks VBA macro from scratch means wrestling with a COM API that has methods taking 23 parameters and returns boolean values that aren’t actually booleans. ...

15 April 2026 · 9 min · CadShift