Can ChatGPT write a SOLIDWORKS VBA macro?
Use it to draft a small macro, then check each method against the API Help for your installed SOLIDWORKS version. A useful first task is to list component occurrences and referenced configurations from the active assembly. Check the active-document guard and the document type before reading components; a part, drawing or unopened document needs a different result.
Try this bounded request: Draft a read-only VBA macro for my stated SOLIDWORKS version that lists occurrences in the active assembly configuration, including subassemblies. Explain the API references, expected output and missing-data cases. Do not open, save, rebuild or change documents. Compare the draft with the component-list tutorial below before running it on a small practice assembly.
Can ChatGPT directly modify my SOLIDWORKS assembly?
A text answer or generated macro is not an executed CAD operation. Modification requires an enabled integration with access to the running application and the intended files. In an API-based function-calling integration, the model requests an action and application code executes it and returns the result. Available actions depend on the integration and its permissions; a chat subscription alone does not describe that CAD connection.
Before a change, identify the target assembly, active configuration, allowed component files and output path. Start on a copy, require explicit approval for writing, and stop if those identities cannot be verified. After execution, reopen the saved output and check the changed components, mates and rebuild results against the requested change. An unchanged file or a success sentence in chat does not establish that the assembly was updated.
Start with a practical check
- Start with a read-only SOLIDWORKS macro — Inspect the active document before considering an operation that changes the model.
- Compare BOM and model-file metadata — BOM–Model Check compares part numbers, file names and declared revisions. It does not inspect CAD geometry or verify a native assembly.
- List assembly components and subassemblies with VBA — Use a five-occurrence practice case to distinguish a flat component list, an assembly hierarchy and BOM quantities.
How the controlled workflow works
- Define a small command contract with typed parameters, allowed files, version requirements and explicit denial rules.
- Validate the model’s proposed action against engineering state and permissions before any CAD mutation occurs.
- Execute through documented SolidWorks APIs or a controlled UI worker and record the actual return values.
- Read the native document after execution; never let the language model declare success from its own plan text.
What evidence should a reviewer inspect?
| Review item | What it can establish |
|---|---|
| Typed tool contract | Prevents free-form text from becoming unrestricted desktop or file-system control. |
| Runtime event log | Distinguishes proposed actions from calls accepted and completed by SolidWorks. |
| Post-action document facts | Verifies components, features, mates and errors from the CAD application. |
Where this answer stops
Generated VBA, C# or API code may be a useful prototype, but it is not production-safe merely because it compiles. Hallucinated method names, unsafe paths and partial document state need independent controls.
Human engineering authority
An authorized engineer or administrator approves tools, scopes and changes; production release remains outside the LLM.
Related ways people ask this question
- Can ChatGPT control SolidWorks?
- How do I connect an LLM to SolidWorks?
- Can Claude or another AI operate SolidWorks?
References and claim boundary
- OpenAI — Function calling: model requests, application execution and returned results
- SOLIDWORKS API Help 2026 — IAssemblyDoc
- SOLIDWORKS Help 2026 — SOLIDWORKS Labs (Beta)
- NIST AI 100-1 — Artificial Intelligence Risk Management Framework
- MST Engineering Intelligence — Product scope and current public boundary
- MST Engineering Intelligence — Evidence model and public status
Limit: External sources support the named standards, platform features or governance concepts. They do not endorse MST or independently validate MST product performance. The public evidence registry governs only the fresh run it identifies; its verdict does not define the implemented product capability status.
FROM THE QUESTION TO YOUR EQUIPMENT
Which task are you trying to improve?
MST Engineering Intelligence. “Can ChatGPT Control SOLIDWORKS? Macros, APIs and Limits.” Engineering Questions Q04. Reviewed 2026-10-06. https://mst-us.ai/questions/can-chatgpt-llm-control-solidworks/
NEXT STEP · NON-CONFIDENTIAL FIRST
Ask MST if your SolidWorks workflow fits
Describe the workflow and decision boundary without uploading protected P&IDs, CAD, BOM, PDM data, credentials or customer identities. Confidential exchange begins only after identity, NDA and scope review.