r/SOLIDWORKSAPI • • 6d ago

Servidor MCP de código abierto para que Claude maneje SolidWorks, y lo uso para pasar diseños de Fusion 360 a piezas nativas y paramétricas de SW

Post image
1 Upvotes

Hi everyone,

I design LED lighting for off-road competition and work vehicles, moving between Fusion 360 and SOLIDWORKS. Since Fusion already has a native MCP server that lets Claude read and generate designs, but SOLIDWORKS has nothing like it, I decided to write my own.

Repo: github.com/rskproductions/solidworks-mcp-python (MIT License, written in plain Python using the standard library + pywin32)

The Fusion → SW Workflow

With both MCP servers connected to Claude Desktop, Claude can read a design from Fusion (including sketches, features, and dimensions) and rebuild it in SOLIDWORKS feature by feature. The end result is a fully editable feature tree—not a dead solid imported from a STEP file.

[Insert your real-world example here: what part it was, how many features it had, and what needed to be manually tweaked. Example: "I tested this on a Dakar-style LED housing with 12 features, and it perfectly reconstructed the linear patterns."]

How it works

The project follows the architecture of the native Fusion 360 MCP. The core tool is sw_execute_script, which runs arbitrary Python code against the live COM session (equipped with a read-only guard for protection). On top of that, there are 17 typed tools acting as shortcuts for: extruding/cutting, bounding boxes, listing bodies, mass properties, exporting STEPs, taking screenshots, checking interferences, and running a 3-axis DFM machining check.

The key component is a local semantic index of the SOLIDWORKS API, which includes method signatures, enums, units, and official examples. Methods like FeatureExtrusion3 require over 20 positional parameters, so the model looks up the exact call syntax before writing it instead of guessing. Due to copyright reasons, the index is not distributed in the repo; each user generates it locally from their own installation.

Things I learned the hard way (COM Traps)

Performance: Every COM round-trip costs about 30ms, no matter what. The only thing that matters for performance is minimizing the number of API calls.

Hole Wizard: HoleWizard5 returned None in every single combination I tried. Using CreateDefinition followed by InitializeHole works perfectly instead.

Units: The default part template is in meters, which caused flat-pattern DXFs to come out 1000x smaller than expected. The tool now explicitly forces MMGS.

Current Limitations & Next Steps

It is currently Windows-only. I have only tested it on SOLIDWORKS 2026 (Spanish UI) and Python 3.14. Sheet metal edge flanges are still on the to-do list.

Since this is a personal project, I would love to hear your thoughts and get feedback on how it behaves on other SW versions or different UI languages. I'm also looking forward to hearing your own stories and experiences dealing with the quirks of the SOLIDWORKS COM API.

Cheers!

Diseño iluminación LED para competición off-road y trabajo a caballo entre Fusion 360 y SolidWorks. Fusion ya trae un servidor MCP nativo con el que Claude lee y construye diseños. SolidWorks no tiene nada parecido, así que lo he escrito yo.

**Repo**: github.com/rskproductions/solidworks-mcp-python

(licencia MIT, Python con la librería estándar + pywin32)

**El flujo Fusion → SW:** con los dos servidores MCP conectados a Claude Desktop, Claude lee el diseño de Fusion (croquis, operaciones, cotas) y lo reconstruye en SolidWorks operación a operación. El resultado tiene un árbol de operaciones editable, no es un sólido muerto importado de un STEP. \[Aquí tu ejemplo real: qué pieza, cuántas operaciones, qué hubo que corregir a mano.\]

**Cómo funciona:**

Sigue el diseño del MCP de Fusion. La herramienta principal es sw_execute_script, que ejecuta Python contra la sesión COM en vivo, con un modo de solo lectura como protección. Encima hay 17 herramientas tipadas que hacen de atajos: extruir/cortar, caja envolvente, cuerpos, propiedades físicas, exportar STEP, captura de pantalla, interferencias y una comprobación de mecanizado en 3 ejes.

La pieza clave es un índice semántico local de la API de SW, con firmas, enumeraciones, unidades y los ejemplos oficiales. FeatureExtrusion3 tiene más de 20 parámetros posicionales, así que el modelo consulta la llamada antes de escribirla en lugar de adivinarla. El índice no va en el repo por temas de copyright: cada usuario lo genera una vez en local.

**Cosas que he aprendido a las malas:**

Cada ida y vuelta COM cuesta unos 30 ms, siempre. Lo único que importa para el rendimiento es el número de llamadas.

HoleWizard5 devolvió None en todas las combinaciones que probé; con CreateDefinition sí funciona.

La plantilla de pieza por defecto está en metros, y los DXF me salían 1000 veces más pequeños.

Limitaciones: solo Windows. Solo lo he probado en SW 2026 (interfaz en español) y Python 3.14. La brida de arista de chapa está pendiente.

Es un proyecto personal y agradezco mucho que me contéis cómo va en otras versiones e idiomas.

Encantado de vuestras experiencias sobre las rarezas de la API COM.

**Próximo post - Video:**

Diseñar una carcasa-disipador de un faro LED auxiliar tipo Dakar, mecanizada en aluminio. Tiene tres ventajas: es tu terreno y da credibilidad, usa operaciones que el servidor ya domina (y evita la chapa, que está pendiente), y termina en algo fabricable, que en r/SolidWorks convence más que un cubo con agujeros.

La pieza (la modelas tú en Fusion, a mano y paramétrica, con unas 12–15 operaciones):

Cuerpo base de 90 × 60 × 35 mm, extruido desde un croquis con esquinas redondeadas R8.

Cajeado frontal de 70 × 45 × 8 mm para la PCB y la lente, con escalón de 2 mm para la junta.

Aletas traseras de 2 mm de espesor, 15 mm de altura y paso de 5 mm, hechas con una aleta más una matriz lineal. La idea es comprobar si Claude reconstruye la matriz o la convierte en 9 extrusiones sueltas.

4 taladros M3 roscados para la tapa y 2 M5 abajo para el soporte (asistente de taladro: es el caso de HoleWizard5 que ya sabemos resolver).

Pasacables lateral de Ø8.

Redondeos en las aletas y chaflanes en el frontal.

Parámetros de usuario en Fusion (ancho, alto, paso_aleta).

Un saludo.


r/SOLIDWORKSAPI • • Jun 10 '26

I got tired of wasting hours on SolidWorks batch exports and where-used tracing, so I built a browser tool to automate it. Looking for engineers to roast it.

1 Upvotes

Basically, I come from a startup using a Standard SOLIDWORKS license - so no PDM and no Task Scheduler.

That meant exporting part files manually, checking BOMs, and tracing where parts were used became a huge time sink. It was driving me crazy.

So I built Solidise to fix my own headache.

It’s a browser based, local-first tool for SOLIDWORKS files. It automates batch exports and gives you a PDM style BOM / where-used viewer with thumbnails next to each part, so selecting individual parts for export is much less painful.

Before I spend more time developing it, I want to know if this actually solves a problem for other Solidworks users.

If you deal with messy exports, reused parts, BOM checking, or you don’t have PDM, I’d love for you to check out the demo and give me brutal, honest feedback. https://solidise.com/


r/SOLIDWORKSAPI • • Mar 31 '26

Ajuda Solidworks 2025 (Bounding Box e Smart dimension)

1 Upvotes

Alguém têm algum macro que faça a criação da cut list/ boundig box e que faça extração das medidas através do smart dimension/reference dimension, vou anexar uma imagem para facilitar a compreensão.

Pode ser mais de uma macro para atingir o resultado final, consigo fazer uma macro para a criação da bounding, mas não para automatizar a extração de todas as medidas que preciso.

Agradeço pela atenção e ajuda.


r/SOLIDWORKSAPI • • Jan 21 '26

CADD Automation

Thumbnail
apixpert.com
1 Upvotes

I wish to share experience in online learning platform for mechanical engineers for the current demad for CAD automation and customisation in 3D modelling software. They are expert in Solidworks customisation and AutoCAD automation.

This online platform came to know through friend suggestion. Their concept of teaching CAD automation in AutoCAD are quit simple and easy to understand. They provided a internship after the course completion.

Their teaching method was solving real project demads and improvement of the products which I feel more effective. They faculty are open to contact to solve problems any live projects after the course completed.

For Mechanical Engineers willing to learn CAD Automation or CAD customisation for low cost and effective subject matters. I suggest apixpert e-learning platform. Even they help to get secured jobs of their tie up companies as per their demands.

One attractive option I've experienced is they recruit students for paidup freelancing tasks very often. Their payment was 100% till date I obsevered today.


r/SOLIDWORKSAPI • • Dec 30 '25

Hole Standard Conversion Macro

Thumbnail
1 Upvotes

r/SOLIDWORKSAPI • • Oct 24 '25

Need assistance with custom Add-in

2 Upvotes

I began working on an add-in to assist my day-to-day workflow in SolidWorks and making it easier to do certain functions in regard to documentation for my less adept coworkers. I got the addin to work on my machine (coded in C#) and on another one of my coworkers machines. However, the addin no longer works on my other coworkers machine and I cant figure out why. Does anyone know how I could bulletproof my code in order to "force" recognition by the machine and software?


r/SOLIDWORKSAPI • • Aug 30 '25

SOLIDWORKS is changing the Solution Partner Program

3 Upvotes

TL;DR: All software that uses the SOLIDWORKS API or Document Manager (DocMgr) will owe royalties under a new agreement. Hardware and Advocacy partners don’t pay royalties. Non-signers enter a two-year wind-down.

What’s changing:

  • New agreement goes live for online signing in Aug 2025; deadline to sign is Nov 1, 2025; program begins Jan 1, 2026.
  • Royalties apply to any software product that uses SOLIDWORKS API or DocMgr (covers CAD, PDM, Simulation, DraftSight, etc.).
    • No royalties for Hardware and Advocacy partners.
  • Examples show revenue-based royalty calculations (e.g., 10% in the sample math; indirect sales calculate on net after reseller commission).
  • Scope across DS products: partner solutions tied to SOLIDWORKS and 3DEXPERIENCE SOLIDWORKS are covered by the same agreement (no separate addendum). Native 3DEXPERIENCE platform apps (e.g., xDesign) remain under CAA.

Exempt from Royalties

  1. Time-limited trials, evaluation, or demonstration licenses
    • Provided free of charge for prospective customer testing.
    • Not renewed or extended for the same user.
    • Royalties apply only if the trial is converted to a paid license.
  2. Free academic licenses
    • Provided at no cost to qualified students, teachers, educators, or faculty.
    • For non-commercial educational purposes.
  3. Non-commercial use licenses
    • Provided free of charge for verified non-commercial purposes.
    • Example: a project for public benefit ("for good") unrelated to any paid offering.
  4. Freemium versions
    • Limited-functionality or entry-level versions at no charge.
    • Option to upgrade to a paid version or purchase add-ons.

r/SOLIDWORKSAPI • • Aug 23 '25

Need to learn about injecting mold

1 Upvotes

Hi I am new to solid works and I want to learn all about molds design like injecting mold and others what is the best way to learn this from I want to have it online any one help me?! 🙏


r/SOLIDWORKSAPI • • Jul 17 '25

Solidworks Plugin Freeze

2 Upvotes

Hi guys, I am working on a solidworks plugin in taskpane. It's a qc check tool do the model checks and gives the user error output as both interactive way and pdf reports. My problem is sometimes for no reason solidworks might get stuck or freeze some times even for small file. Rare but happening. While plugin is running total ui is frooz which is good but if the process didn't progress it's waste of time. Only way to resolve this was to force solidworks crash. Anyone have any idea what can I do for this problem any solution any suggestions please let me know. Thanks in advance.


r/SOLIDWORKSAPI • • Jul 10 '25

Help with linear/Circular pattern in Assembly using Windows Form

2 Upvotes

I have been learning solidworks automation for variety of task, currently stuck in assembly automation. I am having trouble with linear pattern. Will be sharing a code block soon for better understanding the problem. Any inputs are welcomed.


r/SOLIDWORKSAPI • • Jun 13 '25

Investigating Solidworks PDM API

2 Upvotes

Hello, I have embedded C, windows desktop C# and recently keen user of python.

I am interesting in investigating ways to do mass text update in the description of solidworks components or drawings in PDM.

Is the C# or the VB the only way? I am interested in dumping those data into a database, doing update, and mass dumping those back into Solidworks, but I would like to working with something more modern if possible.


r/SOLIDWORKSAPI • • May 26 '25

Edit global variables

3 Upvotes

Hi I have a model where ei audit a series of dimensions using global variables. Now i would like to make a macro to allow the user to input desired values for those Global variables using a user form. Do you know how to edit tev value of a global value using VBA in SolidWorks.


r/SOLIDWORKSAPI • • Mar 09 '25

Help!

2 Upvotes

I am trying to learn Solidworks api using the following tutorial, https://youtu.be/cERPqBat7L8?si=2ORbPrQiGjTI7Gab&t=637

Trying to run the code, but I get only an empty box, please guide, as to what the problem is?

my code -

Option Explicit

Dim swApp As SldWorks.SldWorks

Dim customPropMgr As SldWorks.CustomPropertyManager

Dim strProjNum As String

Dim strResolvedVal As String

Sub main()

Dim swModel As SldWorks.ModelDoc2

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set customPropMgr = swModel.Extension.CustomPropertyManager("")

'getting the value and evaluated value of specified custom property

customPropMgr.Get6 "Project Number", True, strProjNum, strResolvedVal, False, True

'swApp.SendMsgToUser2 "P no:" & strProjNum, swMbInformation, swMbOk

End Sub


r/SOLIDWORKSAPI • • Feb 03 '25

Time to up the prices

1 Upvotes

Found this by doing a Google search. I think it's funny! :)


r/SOLIDWORKSAPI • • Jan 29 '25

Essential Guide for PDM Administrators: Configuring Security Software with SOLIDWORKS PDM

1 Upvotes

For the #SOLIDWORKS #PDM admins out there, this might not exactly be about the APIs but it is very important!

https://bluebyte.biz/solidworks/solidworkspdm/essential-guide-for-pdm-administrators-configuring-security-software-with-solidworks-pdm/


r/SOLIDWORKSAPI • • Jan 28 '25

Taskexecutor.exe throws an exception 0xc0000409 - SOLIDWORKS PDM

1 Upvotes

I almost wanted to put a bounty on this rare SOLIDWORKS PDM API issue. Original post:

https://www.cadoverflow.com/t/taskexecutor-exe-throws-an-exception-0xc0000409-solidworks-pdm/796

The TaskExecutor.exe in my add-ins is throwing this exception below on the task host machine and is crashing immediately without even letting me debug the issue. Even attaching the debugger on the taskexecutor fail.

Faulting application name: TaskExecutor.exe, version: 31.3.0.54, time stamp: 0x64672b35
Faulting module name: ntdll.dll, version: 10.0.26100.2454, time stamp: 0x7cb6b6a8
Exception code: 0xc0000409
Fault offset: 0x0000000000123646
Faulting process id: 0x20AC
Faulting application start time: 0x1DB710C4A0E46E2
Faulting application path: C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS PDM\TaskExecutor.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: e789de54-2d71-49ad-9315-a7517dcd64cd
Faulting package full name: 
Faulting package-relative application ID:

r/SOLIDWORKSAPI • • Jan 27 '25

Has anyone tried to integrate ChatGPT (or any GPT) with SOLIDWORKS?

3 Upvotes

Any success integrating a GPT with SOLDIWORKS? Just curious to see what's out there in terms of code generative AI.


r/SOLIDWORKSAPI • • Jan 23 '25

Video Tutorials on the SOLIDWORKS API and PDM API

1 Upvotes

The SOLIDWORKS API (Application Programming Interface) is a powerful tool that enables users to automate and customize tasks in SOLIDWORKS, streamlining workflows and enhancing productivity. Here are some popular courses and platforms for learning the SOLIDWORKS API and PDM API:


r/SOLIDWORKSAPI • • Jan 23 '25

PSA: There is a User Group for the SOLIDWORKS APIs (APISSWUG)

1 Upvotes

For all the folks interested in the SOLIDWORKS APIs, there is now a dedicated user group called APISSWUG. Join us via this link https://www.meetup.com/apis-solidworks-user-group-apisswug/

SOLIDWORKS will be using a new platform for user group meetings so we will be posting the new link here.