SolidWorks API automation: drawings, BOMs and ERP without the retyping
Zakhar Vityk, CEO, Consedge Tech
If your engineers rebuild similar parts, redraw the same details and retype bills of materials into the ERP, SolidWorks API automation can take that work away. This guide walks through four levels of automation, what each one needs, and where these projects usually go wrong.
What the SolidWorks API gives you
There are three ways to automate SolidWorks:
- Macros. Recorded or written in VBA. Good for a personal shortcut, hard to maintain across a team.
- Add-ins. Compiled code, usually C#, loaded inside SolidWorks with its own commands and task pane. This is the form for tools a whole department uses.
- Stand-alone applications and services. Programs that drive SolidWorks from outside, for batch jobs and server-side generation.
One more tool is worth knowing. The Document Manager API reads properties, configurations, references and bill of materials data straight from files, without starting SolidWorks. It needs a licence key, which requires an active subscription and has to be requested again for each major release.
Four levels of automation
| Level | What it automates | Usual form |
|---|---|---|
| 1. Properties and files | Custom properties, renaming, batch export to PDF, STEP or DXF | Macro or small add-in |
| 2. Rule-based models | Dimensions, configurations and features driven by inputs | Add-in plus a prepared master model |
| 3. Automatic drawings | Views, dimensions, title blocks, BOM tables, PDF and DXF output | Add-in plus drawing templates |
| 4. Integration | Items and BOMs to ERP or PDM, orders in, drawings out | Service that talks to both systems |
Most teams should climb these in order. Each level depends on the discipline the previous one forced.

Every level reads from the same master model, which is why that model is worth preparing before any code is written.
Rule-based models
The API drives a model. It does not repair one. Before any code, the master model needs named dimensions, clean equations and configurations that rebuild without errors across the whole range of inputs.
The code then does three things: sets the inputs, rebuilds, and checks the result. That last step is the one prototypes skip. A rebuild that leaves a feature in error must stop the process and report which input caused it.
Automatic drawings
Drawing automation works best when most of the drawing is decided in advance:
- Templates carry the layout. Sheet format, predefined views, table anchors and notes live in the template.
- Dimensions come from the model. Dimensions marked for drawing in the part are placed more reliably than dimensions generated from scratch.
- Scale is chosen per part. The code picks a sheet scale from the bounding size, then checks that views fit.
- Output is part of the job. PDF for people, DXF flat patterns for laser and punch, STEP for suppliers.
Aim for a drawing that is 90% finished and takes a few minutes to check. Chasing the last 10% of dimension placement is where budgets go.
BOM to ERP
The hard part of a SolidWorks to ERP integration is data, not code. Before development starts, these questions need an owner and an answer:
- Which system is the master for part numbers, descriptions and revisions?
- How do SolidWorks properties map to ERP fields, including units and materials?
- Which components are purchased, which are made, and which never appear in a BOM?
- What triggers the transfer: a button, a release in PDM, a state change?
- What happens when the same assembly is sent twice?
The fifth question matters most in production. A transfer must be safe to repeat. It updates what exists, creates what is missing, and puts anything it cannot match into a queue for a person to resolve.
Server-side generation
The last level removes the engineer's workstation from the loop. An order arrives from a web shop or the ERP. A worker machine opens the master model, applies the parameters, rebuilds, generates drawings and returns the files.
SolidWorks is desktop software, so the design has to respect that:
- One job at a time per SolidWorks instance, with a queue in front.
- A watchdog that detects a hung session or an unexpected dialog and restarts it.
- Scheduled restarts, because long-running sessions degrade.
- Timeouts, retries and a log per job.
- A licence check. Ask your reseller what your licence allows for unattended use before you design around it.
Where these projects go wrong
- Automating a messy library. If two engineers model the same bracket two ways, automation multiplies the inconsistency.
- No owner for the rules. Rules live in one engineer's head, and the project stalls when that person is busy.
- Full auto-dimensioning as the first goal. It is the hardest feature and rarely the most valuable.
- ERP data quality. Duplicate items and free-text units surface the day the integration goes live.
- Upgrades treated as free. Every major SolidWorks release needs a retest, and the Document Manager key needs renewal.
From our work
Consedge Tech has delivered CAD-to-ERP integrations, including with Odoo, a link between CAD and an online laser-cutting service, and server-side drawing generation for SolidWorks.
One design problem is worth sharing, because it shows what "edge case" means in CAD. A client needed annotations made in a web application to land on the right face of a SolidWorks model, and to stay there after the model changed. Faces have no stable name a user can see, and their order shifts on rebuild.
Our design gives each face an identity stored as metadata with the model and carries that identity through export and back. An annotation made in the browser then returns to the same face in SolidWorks. We specified it as C# implementation briefs, with browser-based test stencils so every case could be checked visually before a line of production code was written.
For made-to-order products, the same thinking scales up to a full order-to-drawings pipeline. Our configurator case study describes one, built on a different CAD platform with the same pattern.
If you have a task in mind, book a Feasibility Review. Tell us your SolidWorks version, share two or three sample parts or assemblies, and name your ERP or PDM. You get a written verdict on what can be automated and what it depends on. More on how we build is on the plugin development page.
FAQ
Which language is best for the SolidWorks API?
C# for add-ins and services that a team depends on. VBA macros are fine for small personal tasks.
Can automation run without opening SolidWorks?
Partly. The Document Manager API reads and edits file data such as properties and references without it. Anything that changes geometry or creates drawings needs SolidWorks running.
Can SolidWorks run on a server?
Technically yes, on a dedicated machine with a queue and a watchdog. Confirm with your reseller that your licence allows unattended use.
How long do automated drawings take to review?
That depends on how much of the drawing the templates fix in advance. The goal is a check of minutes instead of hours of drafting.
Working on something like this?
Thirty minutes with the engineers who would build it, then a written verdict — including “don’t build this” where that is the answer.
- First call free, no obligation
- Straight answers
- Fixed-price written verdict
- Senior engineers, not account managers