Automate SOLIDWORKS Pack and Go with API Macros — Run, Rename, and Open the New Drawing

Pack and Go through the UI is fine for a one-off operation. When you’re doing it repeatedly — versioning a drawing before a revision cycle, archiving a job package, moving a drawing to a different project folder with all its references intact — you want a macro that runs Pack and Go, tells you where the new file landed, closes the original, and opens the copy. The SOLIDWORKS API supports all of this via the IPackAndGo interface, but the documentation examples stop at SavePackAndGo and leave the “then open the copy” part as an exercise for the reader. ...

27 July 2026 · 8 min · CadShift

SolidWorks VBA API Events: Why Your Event Handlers Die When the Macro Stops

You set up a WithEvents handler in a SolidWorks VBA macro. The macro runs, SolidWorks does something (opens a document, rebuilds, saves), and your handler fires correctly. Then you close the macro editor and try to use SolidWorks normally — the handler no longer fires. The macro is gone, and so is your event subscription. This confuses VBA developers who are used to Office automation, where event handlers in a document’s VBA project persist as long as the document is open. SolidWorks works differently. Here’s why, and how to keep handlers alive when you need them. ...

15 June 2026 · 7 min · CadShift

SolidWorks API Gotchas: 7 Silent Failures — SelectByID2, Null Components & Rebuild Timing

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

SolidWorks automation: four levels and where drawing creation fits SolidWorks automation exists on a spectrum. Understanding where each approach sits — what it costs to implement, what it can do, and where it breaks — saves engineers from picking a tool that is the wrong shape for the job. Level 1 — Record macro. SolidWorks’ built-in macro recorder captures UI actions as VBA code. You click through a sequence of steps, stop the recorder, and have a macro that replays those steps. This works for simple, identical operations: changing a document property across ten files, printing a drawing with fixed settings. It breaks immediately when the input varies — different part names, different view orientations, any conditional logic. The recorder also silently drops interactions with dialog boxes, property manager panels, and anything that requires polling SolidWorks for a return value. The SolidWorks macro recorder limitations guide documents exactly what it misses. ...

23 April 2026 · 14 min · CadShift

ChatGPT SolidWorks Macros — What Works, What Breaks, and How to Fix AI-Generated VBA

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