SOLIDWORKS API DXF Export: Why VBA and Manual Export Differ (and How to Fix It)

A forum thread from 2026-08-06 captures the problem precisely: a user has a manual workflow — roll back to a feature state, show the body, align the view normal to the target face, then do File > Save As DXF. It works. They then try to replicate it in VBA using IPartDoc.ExportToDWG2, pass the same file path, and get either a failed export (False return, no error) or a DXF that contains nothing. No accepted answer exists because the root cause isn’t obvious from the API documentation. ...

29 July 2026 · 12 min · CadShift

What the SOLIDWORKS Macro Recorder Silently Drops — and What to Write Instead

The SOLIDWORKS macro recorder is a reasonable starting point for simple geometry operations. Record a sketch, a cut-extrude, a fillet — replay it — it works. But the moment you do anything beyond basic feature creation, the recorder either drops the operation entirely, captures it in a form that cannot be replayed on a different model, or generates so much view-manipulation noise that the useful API calls are buried. The official documentation says “not all commands can be recorded.” That sentence is technically accurate and practically useless. This post covers the specific operations that the recorder silently omits, why each one fails, and the API call you need to write instead. ...

28 July 2026 · 8 min · CadShift

SOLIDWORKS PDM: Save Converted PDFs Outside the Vault (Working 2026 Method)

The forum question comes up regularly: how do I get the PDM Convert Task to save PDFs outside the vault? The answers in search results reference SOLIDWORKS PDM 2016-2019 behavior. The mechanism has not fundamentally changed, but two things shifted enough to break older walkthroughs: the Advanced Scripting variable names differ by version, and the Task Host security model tightened in PDM 2021. This post covers the working approach for both PDM Standard and Professional. ...

26 July 2026 · 8 min · CadShift

SOLIDWORKS to DWG Export: Assigning AutoCAD Layers by Material via API Macro

Fabrication shops that receive DWG files from SolidWorks drawings often expect specific AutoCAD layers — BRASS, STAINLESS_STEEL, ALUMINUM — matching the actual part materials. The native Save As layer mapping table in Document Properties → DXF/DWG Export → Map SolidWorks to DXF/DWG maps entity types to layers, not component materials. There is no UI checkbox that says “use material name as layer.” This post shows the API approach: read each component’s material from the drawing views, create named layers in the drawing document, assign components to those layers, then export to DWG. It covers the key API calls, a complete working VBA macro, and the three edge cases that will silently fail on a naive implementation. ...

25 July 2026 · 9 min · CadShift

Linking SolidWorks Drawing Properties to Model Properties Without PDM — The $PRPSHEET Syntax

A Reddit thread on r/SolidWorks recently asked how to get the title block Description field to pull from the part’s custom properties automatically. The answers ranged from “use a macro” to “you need PDM” to “manually copy it every time.” No one mentioned $PRPSHEET. This syntax has been in SolidWorks for well over a decade. It links a drawing annotation directly to a named custom property on the model, without any macro, without PDM, without add-ins. When the part’s Description property changes, the drawing title block updates on open. If you’re manually typing part numbers, descriptions, and materials into title blocks, or using a macro to copy properties from model to drawing, this is the feature you’re missing. ...

24 July 2026 · 8 min · CadShift

SolidWorks Workflow Automation — From Macros to Task Scheduler to Full API Pipelines

“SolidWorks automation” covers four distinct things that are often treated as interchangeable. They aren’t. A VBA macro that exports DXF files is automation. So is a Task Scheduler job that runs every night. So is a PDM Dispatch script that triggers on a workflow transition. So is a C# COM add-in with a custom Property Manager Page. Each approach has a specific setup cost, maintenance burden, and capability ceiling. Picking the wrong one for a given workflow creates either an over-engineered solution or one that fails the moment requirements change. This guide maps the decision. ...

17 July 2026 · 9 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

Power Automate for CAD File Conversion — Desktop Flow Setup, Limitations, and What Actually Works

Engineers searching for “Power Automate convert CAD” are usually trying to solve one of two problems: they have a folder of DWG or STEP files that need to be converted on a schedule, or they want to trigger conversion when a file lands in SharePoint. Power Automate can do both — but the mechanism is different from what most people expect, because there are no native CAD connectors in Power Automate’s connector library. ...

13 June 2026 · 7 min · CadShift

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

Batch DXF Export: SolidWorks vs Inventor — How the Sheet Metal Workflows Actually Differ

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). ...

4 June 2026 · 8 min · CadShift