Category
The foundations of SolidWorks and AutoCAD automation: API object models, the difference between macros and add-ins, and automating 2D/3D workflows with Python and C#.
Everyone starting with CAD automation has to answer three questions first: what the API is, how a macro differs from it, and which layer the job actually belongs to. This category collects the foundational articles that take those three apart.
The SolidWorks API object model — the SldWorks, ModelDoc2, feature and configuration chain — is the common ground beneath both macros and add-ins; the difference between a macro and the API is not how you reach it but where the code lives and how it ships. On the Python side, a COM connection through pywin32 is the shortest path to processing data outside SolidWorks and driving batch work from it.
How to start an automation project belongs here too: which task is worth automating, how to keep the first scope narrow, and what the first version should cover. Once you have picked a layer, the SolidWorks Automation guide takes it step by step; macro writing, debugging and batch processing live in Automation Workshop.
A SolidWorks macro is not an alternative to the API — it runs on it. Where the real line sits, what a macro handles well, and 8 signs you need an add-in.
What the SolidWorks API is and how it works: the SldWorks, ModelDoc2 and PartDoc hierarchy, the selection-based code trap, and a 5-step learning path.
Start from the problem, not the tool. A four-step method for CAD automation: measure the loss, draw the boundary, run a verifiable pilot, widen in the field.
SolidWorks Python scripting with pywin32: connect to the API over COM, drive dimensions, rebuild once, export PDF or DXF — and dodge the COM traps.