/mas-cad-studio:solidworksfrom mas-cad-studio
Automates SOLIDWORKS parts and assemblies via COM, Python, and VBA. Handles batch STEP/PDF/DXF export, mass properties, configuration sweeps, and rebuild diagnostics.
Ships in mas-cad-studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
SOLIDWORKS (pin year e.g. 2024 SP5) exposes COM automation (SldWorks.Application), VBA macros (.swp), .NET interop, and Document Manager (headless metadata without full UI). Claude acts as CAD Automation Engineer: batch STEP/PDF/DXF export, mass properties, configuration sweeps, rebuild diagnostics.
Platform: Windows-only COM; agents must run on machine with licensed SOLIDWORKS. No true Linux headless GUI-less parity for all APIs.
┌─────────────────────────────────────────────────────────────┐
│ win32com → SldWorks.Application → ModelDoc2 / Extension │
│ Batch: Task Scheduler, /m macro, or standalone .NET │
│ Export: SaveAs3 / ExportToFile2 — check errors VARIANT │
└─────────────────────────────────────────────────────────────┘
Use when: parametric BOM/mass reports, configuration export matrices, drawing PDF batches, PDM-adjacent custom steps (respect PDM checkout rules).
Do not use when: cloud-native CAD without SW license; expecting macOS COM; replacing PDM workflow without vault API review.
Dispatch("SldWorks.Application"); set Visible intentionally; Quit only when script owns instance.errors / warnings from SaveAs3 / ExportToFile2 VARIANT byref ints."Default" vs "@config"); suppress design table driven configs explicitly in script.import win32com.client
from win32com.client import VARIANT
import pythoncom
def export_step(path: str) -> None:
pythoncom.CoInitialize()
sw = win32com.client.Dispatch("SldWorks.Application")
sw.Visible = False
model = sw.ActiveDoc
if model is None:
raise RuntimeError("No active document")
ext = model.Extension
errors = VARIANT(pythoncom.VT_BYREF | pythoncom.VT_I4, 0)
warnings = VARIANT(pythoncom.VT_BYREF | pythoncom.VT_I4, 0)
ok = ext.SaveAs3(path, 0, 2, None, None, errors, warnings)
if not ok or errors.value != 0:
raise RuntimeError(f"SaveAs failed err={errors.value} warn={warnings.value}")
Launch with existing session or OpenDoc6 with full path; PDM: checkout first or export fails.
| Symptom | Cause | Fix |
|---|---|---|
| Red/yellow Feature tree | Dangling relations | What's Wrong? / Dangling filter |
| Over-defined mates | Red mate folder | Mate Diagnostics |
| Export empty STEP | Lightweight unresolved | Resolve or export from part |
| COM E_FAIL | SW not running / wrong ProgID | Start SW; match bitness (64-bit) |
| Drawing PDF missing sheets | Wrong sheet selection | ExportPdfData sheet array |
CLI: "sldworks.exe" /m "C:\Macros\batch.swp" for scheduled batch.
MANDATORY: Check SaveAs error VARIANTs. Pin SOLIDWORKS year. Use full rebuild after param changes. Respect PDM checkout; never bypass vault locks in automation without explicit user authorization.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub alivirgo/major-ai-skills --plugin mas-cad-studio3 plugins in 2 repositories ship this exact skill · first indexed Oct 7, 2026
6 skills in this plugin
/blenderAutomate Blender scenes with the bpy Python API, build Geometry Nodes workflows, configure Cycles or EEVEE renders, and troubleshoot headless batch jobs./catiaAutomate CATIA V5 and 3DEXPERIENCE modeling workflows through CAA or COM, including shape design and assembly operations./fusion-360Automate Autodesk Fusion parametric models with the Python API, inspect timeline features, and prepare CAM workflows for review./rhinoAutomate Rhino modeling through RhinoCommon, work with Grasshopper data trees, and configure Rhino.Compute workflows./siemens-nxAutomate Siemens NX modeling with NX Open Python and troubleshoot synchronous modeling or Teamcenter integration.