Demos¶
Every demo on this page drove a real SolidWorks 2026 session through the same MCP tools an MCP client calls, and checked what SolidWorks reported back. Each GIF was captured from that run, with the tool call and its result captioned beneath the SolidWorks window.
Each entry has:
- what it shows, and what the run checked;
- the prompt: the real one for the U-joint, prompt-to-drawing and monitor-stand demos. The other demos are live tests that call the tools directly, so their prompt is an example of what you would type to get the same calls;
- the tool calls, in order;
- the source: the test that made the GIF. Run any of them yourself (see Run a demo yourself).
A whole mechanism from a description: the U-joint¶

SolidWorks ships a U-Joint sample (samples/learn/U-Joint): a bent bracket,
two yokes, a spider, pins and a hand crank, eight parts in a crank
sub-assembly and a main assembly. We read every part, sketch, feature,
dimension and mate from it, wrote it up as a plain-English prompt, and gave
that prompt to Claude Code (Opus 5.5, medium effort) with the server and
the agent skill installed. It built all ten files in
23.5 minutes and 294 SolidWorks calls, with 3 errors it recovered from.

The recording opens on the original sample, then replays the session's 294 calls through an MCP client, each captioned with its result (sped up 80 times). Every call ended as it did in the session.
The prompt
I want to build a small hand-cranked universal joint in SolidWorks: eight parts, a crank sub-assembly, and the main assembly. It's a mechanism: turning the knob turns the crank, which drives the joint through an angle, so the assemblies must still move the way described in sections 9 and 10. Please reason through each part before you start drawing, check every part once it's built, and tell me if something can't be done with the tools rather than guessing. All sizes are in millimetres (the original was drawn in inches, so the numbers are odd). SolidWorks' Y axis is up. Save every part and both assemblies in this folder, with the names given below.
1. bracket.SLDPRT: a bent plate, 6.35 mm thick and 38.1 mm wide. Seen from the side (sketch on the Right plane, Y up, Z towards the front), the inside outline of the bend is an open chain: - a back wall going straight up 82.55 mm from the origin; - from its top, a top arm going forward 57.15 mm; - from the origin, a bottom foot going forward 44.45 mm; - from the front of the foot, a lip rising at 40° for 42.77 mm (it ends 27.49 mm up and 77.22 mm forward). The 6.35 mm thickness is on the outside of that outline: above the top arm, behind the back wall and under the foot. The 38.1 mm width is centred on the Right plane. Drill a 12.7 mm hole straight down through the top arm and on through the foot below it (one cut, both plates), centred across the width and 38.1 mm forward of the back wall's inside face.
2. Yoke_male.SLDPRT: a fork with a stub shaft. - Start with a 38.1 mm diameter cylinder, 47.625 mm tall, standing on the Top plane. - Its bottom becomes a fork with two ears. Each ear is 19.05 mm wide and 8.89 mm thick, and the gap between them is 20.32 mm, centred. Each ear has a rounded end: a full radius of 9.525 mm, centred 9.525 mm above the bottom. Where an ear meets the solid part of the cylinder, round the shoulder with a 9.525 mm radius, so the solid part starts 29.21 mm above the bottom. - Drill a 9.525 mm cross hole through both ears at the centre of their rounded ends, square to the ears. - On top, add a 12.7 mm diameter stub, 19.05 mm tall, on the cylinder's axis. Chamfer its top edge 1.27 mm at 60°. - Cut a flat on the stub, 12.7 mm long down from its top. The flat is 4.7625 mm from the axis, so it is 1.5875 mm deep.
3. Yoke_female.SLDPRT: the same 38.1 x 47.625 mm cylinder with the same fork and the same cross hole as the male yoke, but no stub. Instead, a 9.525 mm hole goes all the way through along its axis.
4. spider.SLDPRT: a 19.05 mm cube centred on the origin. It has two 9.525 mm holes, both through its centre: one front to back, and one left to right.
5. pin.SLDPRT: a 9.398 mm diameter rod, 38.1 mm long.
6. crank-shaft.SLDPRT: a 12.573 mm diameter shaft, 40 mm long, standing on the Top plane. - Around its bottom 15.875 mm, a collar 18.923 mm in diameter. - A 4.763 mm fillet where the collar meets the shaft, and a 4.763 mm fillet on the collar's top outer edge. - In the bottom, a D-shaped socket 12.7 mm deep. It is a 12.954 mm circle with a flat 4.889 mm from the axis, to take the male yoke's stub. - A 2.381 mm cross hole through the collar wall, square to the socket's flat and 6.35 mm up from the bottom. - At the top, a matching flat 6.35 mm long, 4.889 mm from the axis. - A 0.794 mm x 45° chamfer on the top end.
7. crank-arm.SLDPRT: a flat bar, 75 x 19.05 x 6.35 mm. - Near one end, a 12.7 mm D-hole centred 9.525 mm from the end and on the bar's centreline. Its flat is 4.889 mm from the hole's centre, towards that end. It fits the shaft's top flat. - Near the other end, a 4.763 mm hole 9.525 mm from that end, also on the centreline.
8. crank-knob.SLDPRT: a mushroom-shaped knob, revolved 360° about the vertical axis. Going up from the bottom, its profile has: - a 4.572 mm diameter shank, 6.35 mm long; - a step out to a 9.525 mm diameter; - a concave quarter-round of radius 6.35 mm that flares out to 22.225 mm diameter, 12.7 mm up; - a convex half-round of radius 4.7625 mm that reaches 31.75 mm diameter at its widest; - a flat top 22.225 mm in diameter, 22.225 mm above the bottom.
9. crank sub.SLDASM: - The crank shaft is fixed. - The crank arm's D-hole goes on the shaft's top flat: the hole is concentric with the shaft, the flats are parallel, and the arm sits on the shoulder where the flat starts. The flats lock the arm to the shaft, so they turn together. - The knob's shank goes into the arm's small hole, with the knob's step resting on the arm's top face. The knob stays free to spin in its hole, like a handle.
10. UJoint.SLDASM: - The bracket is fixed. - The male yoke hangs under the bracket's top arm. Its stub goes up through the bracket's hole (concentric), and the top of its cylinder is flat against the underside of the arm. It must stay free to turn in that hole. - The spider sits centred between the male yoke's ears, with one of its holes lined up with the ears' cross hole. It pivots on that axis. - The female yoke's ears go around the spider's other hole, centred on the spider. Its top face is parallel to the bracket's sloped lip, so its axis points down and forward. It pivots on the spider and turns about its own axis. - Put one pin through the male yoke's ears and the spider, and one pin through the female yoke's ears and the spider. Each pin's ends are flush with its yoke's round outside, and each pin turns with its yoke. - Insert the crank sub-assembly. Its shaft's D-socket goes over the male yoke's stub: concentric, with the flats parallel, and the bottom of the shaft 1 mm above the top of the bracket. The flats lock the crank to the male yoke. - The result should be a mechanism with one free motion: turning the knob around the crank shaft's axis turns the male yoke, the spider rocks on its pins, and the female yoke turns about its tilted axis. Choose mates that leave exactly those rotations free and lock everything else.
When it's all built, check each part's size and the assembly's component and mate counts, say which rotations your mates leave free, and tell me what you couldn't do.
How close it got. Part volumes in mm³, read back by verify_model:
| Part | Sample | Agent | Difference |
|---|---|---|---|
| bracket | 56,363.5 | 56,922.8 | +1.0 % (sharp bends; the sample's are rounded, and the prompt gave no bend radius) |
| Yoke_male | 30,825.7 | 30,777.8 | −0.16 % |
| Yoke_female | 27,252.8 | 27,210.2 | −0.16 % |
| spider | 4,775.0 | 4,775.0 | 0 |
| pin | 2,642.9 | 2,642.9 | 0 |
| crank-shaft | 5,948.8 | 5,935.5 | −0.22 % |
| crank-arm | 8,206.4 | 8,206.4 | 0 |
| crank-knob | 7,528.1 | 7,528.1 | 0 |
The main assembly has the bracket fixed and seven components, mated so that turning the knob turns the crank and male yoke, rocks the spider and turns the female yoke about its tilted axis.
What it couldn't do, and said so:
- The two full-length pins cross inside the spider (553 mm³ of overlap). The sample has the same clash; a real joint uses one long and two short pins.
- The crank shaft's 4.763 mm collar fillets are larger than the 3.175 mm step they sit on, so SolidWorks blends them into one curve.
add_matecan't pick faces, and no tool can fix a part or make a sub-assembly flexible, so the knob spins only inside the crank sub-assembly. There's no angled plane or 60° chamfer either: it used an angle mate and drew the chamfer into the profile. These gaps are #209.
With and without the skill. The same prompt, run without the skill or the server instructions, made the same parts to within 0.1 mm³: with the skill the agent hit fewer errors (3 against 7) and checked its work twice as often. For Opus 5.5 at medium effort, the skill changed how the agent worked, not what it built. The full comparison is on the agent skill page, and #207 tracks writing skills that improve results.
Source: tests/live/demo_ujoint_replay.py,
replaying with_skill_calls.json.
Record it with:
powershell -ExecutionPolicy Bypass -File tests\scripts\live_demo.ps1 `
-Test tests/live/demo_ujoint_replay.py `
-CaptureDir docs/assets/demos/ujoint -Record -PromptSeconds 12
From a prompt to a printable monitor stand¶

The recording opens on the prompts, then replays the build as the script below runs it, at the sizes the stand was finished at by hand (see "Finished by hand"): 23 tool calls, each captioned with its result. The camera turns to an isometric view after the block, each cut, the arches and the pocket, so each feature shows as it is made. It is sped up five times.
Printed. The finished stand on the printer, in PETG, printed on its side with tree supports (sped up):

Prompts. A real Claude Code session with the server connected; the user's words, unedited.
Ok, so this is fairly simple, so please make sure to reason through all the pieces and steps to make sure the tool calls make sense. I'm looking to make a simple square(ish) monitor stand with 4 legs, and large fillets on all corners where the legs meet the base where the monitor stand will rest on, think mini-table with an arch on 3 sides, front, left and right, but not the back.
The monitor base itself is 170mm "deep" in the y direction if the positive X-axis is on your left and running left and right of you, and 173.71mm "wide" in the x-axis, and we'll want to add 1 cm to each side, extrude that some amount that makes sense for PETG, let's say 1.5 cm? I want it to look proportional, now the legs should be around 4 cm square on each corner, and I want the height to be roughly 50-55mm in total height from the bottom of the legs to the top of the monitor base
The agent replied with a plan and two questions (what the back should be, and where to save). The answers: a plain square opening at the back, and a folder for the part. After the build, one follow-up:
can you make a shallow cut lip 1-2 mm wider than the actual x and y dimentions of the top where the display monitor would be so it sits "in" the monitor stand 3-4 mm.
What it shows. A 3D-printable part designed from a description, with every step checked against a hand calculation as it was built. The agent turns "roughly" and "around" into numbers and says why. It works out every sketch and each fillet edge's position before the first call. It asks only what it can't decide alone: the back of the stand and where to save.
| Step | SolidWorks reads back | Hand calculation |
|---|---|---|
| Block | 2 024 269.5 mm³, 193.71 x 55 x 190 mm | 193.71 x 190 x 55 |
| Front/back opening | −864 196 mm³ | 113.71 x 40 x 190 |
| Left/right opening | −352 000 mm³; 808 073.5 mm³ left | 110 x 40 x 80; top plate + four legs |
| Six R25 arch fillets | 843 259.2 mm³ | +6 x (1 − π/4) x 25² x 40 = 840 264 (0.4 % low: the blend where the front and side arches meet at each front leg's inner corner is left out) |
| −90 666.36 mm³; 752 592.9 mm³ final | 175.71 x 172 x 3 |
The plan the agent made
- Top plate 193.71 x 190 x 15 mm (the monitor base plus 10 mm each side), legs 40 x 40 mm, 55 mm overall: the top of the range, so R25 arches still leave 15 mm of straight leg and about 60 mm of flat ceiling in each opening.
- Extrude the full footprint 55 mm, then cut the front/back opening and the left/right opening through the block, 40 mm high; four legs remain.
- One R25 fillet on the six edges where a leg's inner face meets the underside, picked by each edge's midpoint: two for the front arch, four for the sides. The back legs' edges facing the back stay sharp.
- The follow-up: a pocket 1 mm larger than the monitor base on each side (175.71 x 172 mm), 3 mm deep, on a plane at the top face.
- SolidWorks' Y axis is up, so the prompt's "deep" runs along Z. Every sketch is centred on the origin, so no sketch axis can mirror anything.
The tool calls
- Part:
create_part,set_unitsmm. - Block:
create_sketchTop,add_rectangle,exit_sketch,create_extrusion55 mm. - Openings: on Front, then on Right,
create_sketch,add_rectangle,exit_sketchandcreate_cut_extrudeThroughAllBoth. - Arches: one
add_filletR25 on six edges. - Check and save:
rebuild_model,verify_model,save_file. - Pocket (the follow-up):
list_open_documents(the stand is still the active part),create_reference_plane, thencreate_sketch,add_rectangle,exit_sketch,create_cut_extrude3 mm, andrebuild_model,verify_model,save_fileagain.
All 28 calls with their arguments
| # | Tool | Arguments |
|---|---|---|
| 1 | create_part |
{"name": "MonitorStand", "units": "mm"} |
| 2 | set_units |
{"unit_system": "mm"} |
| 3 | create_sketch |
{"plane": "Top"} |
| 4 | add_rectangle |
{"x1": -96.855, "y1": -95, "x2": 96.855, "y2": 95} |
| 5 | exit_sketch |
{} |
| 6 | create_extrusion |
{"sketch_name": "Sketch1", "depth": 55} |
| 7 | create_sketch |
{"plane": "Front"} |
| 8 | add_rectangle |
{"x1": -56.855, "y1": 0, "x2": 56.855, "y2": 40} |
| 9 | exit_sketch |
{} |
| 10 | create_cut_extrude |
{"sketch_name": "Sketch2", "depth": 200, "end_condition": "ThroughAllBoth"} |
| 11 | create_sketch |
{"plane": "Right"} |
| 12 | add_rectangle |
{"x1": -55, "y1": 0, "x2": 55, "y2": 40} |
| 13 | exit_sketch |
{} |
| 14 | create_cut_extrude |
{"sketch_name": "Sketch3", "depth": 200, "end_condition": "ThroughAllBoth"} |
| 15 | add_fillet |
{"radius": 25, "edge_names": ["0.056855,0.040,0.075", "-0.056855,0.040,0.075", "0.076855,0.040,0.055", "-0.076855,0.040,0.055", "0.076855,0.040,-0.055", "-0.076855,0.040,-0.055"]} |
| 16 | rebuild_model |
{} |
| 17 | verify_model |
{"bounding_box_mm": [193.71, 55, 190], "volume_mm3": 840264, "solid_body_count": 1, "feature_count": 4, "relative_tolerance": 0.005} |
| 18 | save_file |
{"file_path": "MonitorStand.SLDPRT"} |
| 19 | list_open_documents |
{} |
| 20 | create_reference_plane |
{"reference": "Top Plane", "offset": 55} |
| 21 | create_sketch |
{"plane": "Plane1"} |
| 22 | add_rectangle |
{"x1": -87.855, "y1": -86, "x2": 87.855, "y2": 86} |
| 23 | exit_sketch |
{} |
| 24 | create_cut_extrude |
{"sketch_name": "Sketch4", "depth": 3, "end_condition": "Blind"} |
| 25 | rebuild_model |
{} |
| 26 | verify_model |
{"bounding_box_mm": [193.71, 55, 190], "volume_mm3": 752592.9, "solid_body_count": 1, "relative_tolerance": 0.001} |
| 27 | save_file |
{} |
| 28 | verify_model |
{"feature_count": 6} |
The fillet's edges are midpoints in metres; the other lengths are mm. The save path is shortened to the file name here.
Printing it
The pocket is cut into the top face, so the stand needs some support either way up: top-down with support in the pocket, or legs-down with support under the arches. The print recording above has it on its side, with tree supports.
Finished by hand. The user then made three changes in SolidWorks:
| Change | Session | By hand |
|---|---|---|
Overall height (D1@Boss-Extrude1) |
55 mm | 66 mm, so the top is 26 mm and the legs stay 40 mm |
Pocket depth (D1@Cut-Extrude3) |
3 mm | 11.46 mm, leaving a 14.54 mm floor under the monitor |
Pocket plane (Plane1) |
Top Plane offset 55 mm | The stand's top face, offset 0, so it follows the height |
Asked to read the part, the agent found the changes with list_features,
list_model_dimensions (per feature) and verify_model. A 26 mm top with
the same legs, arches and pocket outline, cut 11.46 mm deep, comes to
901 762 mm³ by hand. SolidWorks measures 901 769 mm³.
The script below was then updated to reproduce this part: 66 mm, a 26 mm
top and an 11.46 mm pocket are its defaults. It sketches the pocket on the
stand's top face (create_sketch with face_point), as the user did by
hand, so the pocket follows the height when D1@Boss-Extrude1 is edited
later, and no reference plane is needed.
Rebuild it, or at another size. The script replays the
calls with every dimension an option, and checks the result the same way.
At its defaults it makes 22 calls, and 23 with --stl as in the recording;
the session's own 28 calls are listed above. --look turns the camera to
an isometric view after each feature, as the recording does.
# The finished stand
.\.venv\Scripts\python.exe scripts\demo_monitor_stand.py --out "C:\path\to\MonitorStand.SLDPRT"
# The stand as the session left it
.\.venv\Scripts\python.exe scripts\demo_monitor_stand.py --out "C:\path\to\MonitorStand.SLDPRT" `
--height 55 --top 15 --pocket-depth 3
# Taller arches and a shallower pocket, over the saved part, with an STL
.\.venv\Scripts\python.exe scripts\demo_monitor_stand.py --out "C:\path\to\MonitorStand.SLDPRT" `
--height 70 --fillet 30 --pocket-depth 8 --replace --stl
Run it with --help for every option: monitor base size, margin, top, leg,
height, fillet, pocket clearance and depth.
To record the demo again:
powershell -ExecutionPolicy Bypass -File tests\scripts\live_demo.ps1 `
-Test tests/live/test_live_sw_monitor_stand_demo.py::test_monitor_stand_from_prompt_to_part `
-CaptureDir docs/assets/demos/monitor-stand -Record -PromptSeconds 12
Source: tests/live/test_live_sw_monitor_stand_demo.py,
which runs the build in
scripts/demo_monitor_stand.py
From a prompt to an assembly drawing¶

Prompt
Make a 100 x 50 x 10 mm AISI 1020 mounting plate with four M5 clearance holes, 10 mm in from each edge, and draw it fully dimensioned. Stack two of them 10 mm apart, check the result, and draw the assembly with a BOM.
What it shows. The 58 tool calls an agent made from that prompt, replayed
against SolidWorks 2026 and recorded (sped up five times). It builds a fully
defined plate sketch, extrudes it, applies the material and checks the part
with verify_model. It then makes an A3 drawing with every model dimension
laid out clear of the others, and adds datums A, B and C and a position
tolerance on the holes. Two plates are mated 10 mm apart and checked, and the
assembly gets its own drawing with a BOM and the same GD&T.
Each result is checked against a hand calculation:
- the plate's volume, 49 049.7 mm³ (the block less four Ø5.5 holes);
- its mass, 0.3875 kg of AISI 1020;
- the 10 mm gap, read from the 30 mm height of the stack;
- the BOM quantity, two plates.
Not the shortest route
The demo is paced for reading, and its calls are chosen to show what the tools can do, not to be the fewest calls. Every sketch dimension is added one at a time, and the mate distance is stepped down from 60 to 20 mm only so the plates are seen coming together.
The plan the agent made
- Sketch on Top: a 100 x 50 outline from the origin and four Ø5.5 circles (one Ø, the rest equal), each located from two edges; extrude 10 mm.
- AISI 1020, then
verify_model: 49 049.7 mm³, 0.3875 kg, 1 feature. - Plate drawing: A3, model dimensions, centre marks, notes, title block. GD&T: datums A, B, C and position Ø0.2 Ⓜ on the holes.
- Assembly: the plate twice; Front and Right planes coincident, Top planes
60 mm apart, brought down to 20 (a 10 mm gap).
verify_model: 2 parts, 3 mates, no interference. - Assembly drawing with a BOM (the plate, QTY 2) and the same GD&T.
The tool calls, in stages
- Sketch (24 calls):
create_sketchon Top; fouradd_linefor the outline;add_circlefor each hole;add_sketch_dimensionfor the 100, the 50, one Ø5.5 and each hole 10 mm from two edges;add_sketch_constraintmaking the other three holes equal;exit_sketch. - Check and extrude:
check_sketch_fully_defined, thencreate_extrusion10 mm, which reads back +49 049.7 mm³. - Material and check:
list_model_dimensions(finds the Ø5.5 by value),set_materialAISI 1020,verify_model. - Plate drawing:
generate_drawing_packagePS-01 (A3, four views, dimensions, notes, title block, PDF),auto_center_marks. - GD&T:
add_datum_tagA, B and C, thenadd_gtol⊕ Ø0.2 Ⓜ A|B|C on the Ø5.5. - Assembly:
insert_componenttwice,list_components, threeadd_mate, tenset_dimensionstepping the gap down,verify_model. - Assembly drawing:
set_custom_propertyMaterial,generate_drawing_packagePS-02 withinclude_bom, then the same datums and position frame.
All 58 calls with their arguments
| # | Tool | Arguments |
|---|---|---|
| 1 | create_sketch |
{"plane": "Top"} |
| 2 | add_line |
{"x1": 0.0, "y1": 0.0, "x2": 100.0, "y2": 0.0} |
| 3 | add_line |
{"x1": 100.0, "y1": 0.0, "x2": 100.0, "y2": 50.0} |
| 4 | add_line |
{"x1": 100.0, "y1": 50.0, "x2": 0.0, "y2": 50.0} |
| 5 | add_line |
{"x1": 0.0, "y1": 50.0, "x2": 0.0, "y2": 0.0} |
| 6 | add_sketch_dimension |
{"entity1": "Line_1", "entity2": null, "dimension_type": "linear", "value": 100.0} |
| 7 | add_sketch_dimension |
{"entity1": "Line_4", "entity2": null, "dimension_type": "linear", "value": 50.0} |
| 8 | add_circle |
{"center_x": 10.0, "center_y": 10.0, "radius": 2.75} |
| 9 | add_sketch_dimension |
{"entity1": "Circle_7", "entity2": null, "dimension_type": "diameter", "value": 5.5} |
| 10 | add_sketch_dimension |
{"entity1": "Line_4", "entity2": "Circle_7", "dimension_type": "linear", "value": 10.0} |
| 11 | add_sketch_dimension |
{"entity1": "Line_1", "entity2": "Circle_7", "dimension_type": "linear", "value": 10.0} |
| 12 | add_circle |
{"center_x": 90.0, "center_y": 10.0, "radius": 2.75} |
| 13 | add_sketch_constraint |
{"entity1": "Circle_7", "entity2": "Circle_11", "relation_type": "equal"} |
| 14 | add_sketch_dimension |
{"entity1": "Line_2", "entity2": "Circle_11", "dimension_type": "linear", "value": 10.0} |
| 15 | add_sketch_dimension |
{"entity1": "Line_1", "entity2": "Circle_11", "dimension_type": "linear", "value": 10.0} |
| 16 | add_circle |
{"center_x": 90.0, "center_y": 40.0, "radius": 2.75} |
| 17 | add_sketch_constraint |
{"entity1": "Circle_7", "entity2": "Circle_15", "relation_type": "equal"} |
| 18 | add_sketch_dimension |
{"entity1": "Line_2", "entity2": "Circle_15", "dimension_type": "linear", "value": 10.0} |
| 19 | add_sketch_dimension |
{"entity1": "Line_3", "entity2": "Circle_15", "dimension_type": "linear", "value": 10.0} |
| 20 | add_circle |
{"center_x": 10.0, "center_y": 40.0, "radius": 2.75} |
| 21 | add_sketch_constraint |
{"entity1": "Circle_7", "entity2": "Circle_19", "relation_type": "equal"} |
| 22 | add_sketch_dimension |
{"entity1": "Line_4", "entity2": "Circle_19", "dimension_type": "linear", "value": 10.0} |
| 23 | add_sketch_dimension |
{"entity1": "Line_3", "entity2": "Circle_19", "dimension_type": "linear", "value": 10.0} |
| 24 | exit_sketch |
{} |
| 25 | check_sketch_fully_defined |
{"sketch_name": "Sketch1"} |
| 26 | create_extrusion |
{"sketch_name": "Sketch1", "depth": 10.0} |
| 27 | list_model_dimensions |
{"feature_name": "Sketch1"} |
| 28 | set_material |
{"material_name": "AISI 1020"} |
| 29 | verify_model |
{"volume_mm3": 49049.7, "mass_kg": 0.3875, "bounding_box_mm": [100.0, 10.0, 50.0], "feature_count": 1, "solid_body_count": 1} |
| 30 | generate_drawing_package |
{"model_path": "Demo Plate.SLDPRT", "output_dir": "drawings", "title": "Demo Plate", "drawing_number": "PS-01", "author": "solidworks-mcp", "notes": ["4 X Ø5.5 THRU, M5 CLEARANCE", "GENERAL TOLERANCES ISO 2768-m", "QTY 2 PER ASSEMBLY PS-02"]} |
| 31 | auto_center_marks |
{"view_name": "Drawing View2"} |
| 32 | add_datum_tag |
{"label": "A", "attach_x_mm": 86.25, "attach_y_mm": 108.75, "x_mm": 86.25, "y_mm": 96.75} |
| 33 | add_datum_tag |
{"label": "B", "attach_x_mm": 56.25, "attach_y_mm": 116.25, "x_mm": 42.25, "y_mm": 116.25} |
| 34 | add_datum_tag |
{"label": "C", "attach_x_mm": 288.75, "attach_y_mm": 116.25, "x_mm": 274.75, "y_mm": 116.25} |
| 35 | add_gtol |
{"characteristic": "position", "tolerance": 0.2, "diameter_zone": true, "material_condition": "mmc", "datums": ["A", "B", "C"], "dimension_view": "Drawing View2", "dimension_name": "D3@Sketch1"} |
| 36 | insert_component |
{"file_path": "Demo Plate.SLDPRT"} |
| 37 | insert_component |
{"file_path": "Demo Plate.SLDPRT", "y": 40.0} |
| 38 | list_components |
{} |
| 39 | add_mate |
{"component_a": "Demo Plate-1", "component_b": "Demo Plate-2", "entity_a": "Front Plane", "entity_b": "Front Plane", "mate_type": "coincident", "distance": 0.0} |
| 40 | add_mate |
{"component_a": "Demo Plate-1", "component_b": "Demo Plate-2", "entity_a": "Right Plane", "entity_b": "Right Plane", "mate_type": "coincident", "distance": 0.0} |
| 41 | add_mate |
{"component_a": "Demo Plate-1", "component_b": "Demo Plate-2", "entity_a": "Top Plane", "entity_b": "Top Plane", "mate_type": "distance", "distance": 60.0} |
| 42 | set_dimension |
{"name": "D1@Distance1", "value": 56.0} |
| 43 | set_dimension |
{"name": "D1@Distance1", "value": 52.0} |
| 44 | set_dimension |
{"name": "D1@Distance1", "value": 48.0} |
| 45 | set_dimension |
{"name": "D1@Distance1", "value": 44.0} |
| 46 | set_dimension |
{"name": "D1@Distance1", "value": 40.0} |
| 47 | set_dimension |
{"name": "D1@Distance1", "value": 36.0} |
| 48 | set_dimension |
{"name": "D1@Distance1", "value": 32.0} |
| 49 | set_dimension |
{"name": "D1@Distance1", "value": 28.0} |
| 50 | set_dimension |
{"name": "D1@Distance1", "value": 24.0} |
| 51 | set_dimension |
{"name": "D1@Distance1", "value": 20.0} |
| 52 | verify_model |
{"component_count": 2, "mate_count": 3, "no_interference": true} |
| 53 | set_custom_property |
{"name": "Material", "value": "AISI 1020"} |
| 54 | generate_drawing_package |
{"model_path": "Plate Stack.SLDASM", "output_dir": "drawings", "title": "Plate Stack", "drawing_number": "PS-02", "author": "solidworks-mcp", "notes": ["2 X DEMO PLATE PS-01, AISI 1020", "PLATES SPACED 10 MM APART"], "include_bom": true} |
| 55 | add_datum_tag |
{"label": "A", "attach_x_mm": 105.0, "attach_y_mm": 111.25, "x_mm": 105.0, "y_mm": 99.25} |
| 56 | add_datum_tag |
{"label": "B", "attach_x_mm": 75.0, "attach_y_mm": 116.25, "x_mm": 61.0, "y_mm": 116.25} |
| 57 | add_datum_tag |
{"label": "C", "attach_x_mm": 295.0, "attach_y_mm": 116.25, "x_mm": 281.0, "y_mm": 116.25} |
| 58 | add_gtol |
{"characteristic": "position", "tolerance": 0.2, "diameter_zone": true, "material_condition": "mmc", "datums": ["A", "B", "C"], "dimension_view": "Drawing View2", "dimension_name": "D3@Sketch1"} |
The same calls as JSON:
plate_stack_calls.json.
Step by step: one frame per call, with its result

Source: tests/live/test_live_sw_readme_demo.py
Checking a model against expected values¶
verify_model reads the active part or assembly back from SolidWorks and
gives a pass or fail for each expected value. create_extrusion,
create_revolve and create_cut_extrude also report the volume and size
they changed. Each test compares SolidWorks' numbers with a hand
calculation. The parts are sketched through the adapter, and the calls below
are the MCP tool calls each test makes.
tests/live/test_live_sw_verify_model.py
A block that passes, and expectations that fail¶

Example prompt: Extrude a 100 x 50 rectangle 10 mm, make it AISI 1020, and check it is 50 000 mm³ and 0.395 kg, with one feature and one body.
What it shows. The extrusion reports +50 000 mm³. The block passes every check. Asked for 60 000 mm³ and a 100 x 50 x 10 box in the wrong axis order, it fails exactly those two checks and says the box is oriented differently.
Tool calls
create_extrusion({"sketch_name": "Sketch1", "depth": 10})verify_model({"volume_mm3": 50000, "mass_kg": 0.395, "bounding_box_mm": [100, 10, 50], "feature_count": 1, "solid_body_count": 1})verify_model({"volume_mm3": 60000, "bounding_box_mm": [100, 50, 10]})
A round part's size is exact¶

Example prompt: Make a Ø20 x 40 mm cylinder and check its volume and size.
What it shows. The cylinder is 12 566.4 mm³ and 20 x 40 x 20 mm.
verify_model measures size from the part's extreme points, which are exact
on a round part; the caption shows SolidWorks' own part box beside it.
Tool calls
create_extrusion({"sketch_name": "Sketch1", "depth": 40})verify_model({"volume_mm3": 12566.4, "bounding_box_mm": [20, 40, 20]})
Reading the model keeps the selection¶

Example prompt: Tell me the volume of this part without losing what I have selected.
What it shows. Four edges are selected before the call and are still
selected after it. With no expectations given, verify_model only reports
(verdict report_only) and does not rebuild the model.
Tool calls
create_extrusion({"sketch_name": "Sketch1", "depth": 10})verify_model({})
A revolve reports the volume it added¶

Example prompt: Revolve a 10 x 40 mm profile 360° about the centreline and tell me how much material it added.
What it shows. The revolve's reply carries measured_change: +12 566 mm³
and a 20 x 40 x 20 mm box after.
Tool calls
create_revolve({"sketch_name": "Sketch1", "axis_entity": "Centerline_1", "angle": 360})
A cut reports the volume it removed¶

Example prompt: Cut a Ø5.5 hole 6 mm deep in the middle of this block and tell me what it removed.
What it shows. The cut removes 142.5 mm³, and the block's outer size is unchanged.
Tool calls
create_extrusion({"sketch_name": "Sketch1", "depth": 15})create_cut_extrude({"sketch_name": "Sketch2", "depth": 6})
An assembly: parts, mates and interference¶

Example prompt: Mate these two blocks 20 mm apart and check there are two parts, two mates and no interference.
What it shows. Two blocks, one coincident mate and one 20 mm distance
mate. verify_model counts 2 components and 2 mates, finds no interference,
and reports the assembly's size.
Tool calls
verify_model({"component_count": 2, "mate_count": 2, "no_interference": true})
The tools the U-joint was missing¶
Building the U-joint from a prompt, both agent sessions hit the same walls: no face mates, no way to let a part move, no angled planes or chamfers, and an extrusion reply that hid what it built (#209). Each demo below is a live test of the fix on SolidWorks 2026, calling the MCP tools with plain dicts, as a script would.
Source: tests/live/test_live_sw_ujoint_tool_gaps.py.
A bent plate from an open outline¶

Example prompt: Make a bent plate: an 80 mm wall and a 40 mm foot, 6.35 mm thick, 38.1 mm wide, centred on the Right plane.
What it shows. Two lines, not a closed outline, extruded as a 6.35 mm
thin wall on both sides of the line and 19.05 mm each way. One body of
29,032.2 mm³, exactly (80 + 40) x 6.35 x 38.1, and the reply says
MidPlane and the wall it built.
Tool calls
create_extrusion({"sketch_name": "Sketch1", "depth": 38.1, "both_directions": true, "thin_feature": true, "thin_thickness": 6.35, "thin_side": "mid_plane"})
Both directions, and the reply says so¶

Example prompt: Extrude this rectangle 20 mm, centred on its sketch plane.
What it shows. The body spans -10 to 10 mm about the sketch plane, and
the reply's end_condition is MidPlane. It used to echo direction:
blind, so an agent thought both_directions was ignored.
Tool calls
create_extrusion({"sketch_name": "Sketch1", "depth": 20, "both_directions": true})
A 60° chamfer, and flipping it¶

Example prompt: Chamfer the top front edge 2 mm at 60°, and the back edge the other way round.
What it shows. Each chamfer removes 138.56 mm³ (½ x 2 x 2·tan 60° x
40 mm). Unflipped, the chamfer face slopes 60° from the top; flipped, 30°:
flip swaps which face the 2 mm is measured on.
Tool calls
add_chamfer({"distance": 2, "angle": 60, "edge_names": ["0,0.01,0.01"]})add_chamfer({"distance": 2, "angle": 60, "flip": true, "edge_names": ["0,0.01,-0.01"]})
A plane at 40° about an axis¶

Example prompt: Add a plane at 40° to the Top Plane, tilted about the x axis.
What it shows. create_axis names the axis it makes, and the new plane
is exactly 40° from the Top Plane about it.
Tool calls
create_axis({"reference": "x"})create_reference_plane({"reference": "Top Plane", "angle": 40, "axis": "Axis1"})
A plane off a sloped face¶

Example prompt: Put a plane 5 mm above the sloped face of this wedge.
What it shows. A point on the 3-4-5 slope picks the face. The plane's normal is (0.6, 0.8, 0), parallel to the slope, and it sits 5.000 mm off it.
Tool calls
create_reference_plane({"face_point": [20, 15, 5], "offset": 5})
A pin in its hole, by two face mates¶

Example prompt: Put the pin through the plate's hole, flush with the plate's bottom.
What it shows. Each face is a point in its own part's coordinates, as the part was modelled. A concentric mate between the hole's wall (25, 5, 0) and the pin's round face (4.75, 15, 0) puts the pin's axis exactly on the hole's, 20 mm from the plate's origin. A coincident mate between the two bottom faces stops it sliding along that axis: the pin runs from 0 to 30 mm above the plate's bottom, through the hole.
Tool calls
add_mate({"component_a": "mate_plate-1", "component_b": "mate_pin-1", "face_a": [25, 5, 0], "face_b": [4.75, 15, 0], "mate_type": "concentric"})add_mate({"component_a": "mate_plate-1", "component_b": "mate_pin-1", "face_a": [-20, 0, 0], "face_b": [0, 0, 0], "mate_type": "coincident", "alignment": "aligned"})
Fixed, floating and flexible¶

Example prompt: Let the crank sub-assembly turn inside the main assembly.
What it shows. The first part in, which SolidWorks fixes, floats and is fixed again. A sub-assembly turns flexible, so its own mates can move in the main assembly, and its suppression, visibility, configuration and BOM setting are unchanged.
Tool calls
set_component_state({"component": "state_plate-1", "fixed": false})set_component_state({"component": "state_plate-1", "fixed": true})set_component_state({"component": "gap_pin_plate-1", "flexible": true})
Interference, before and after¶

Example prompt: Does anything overlap? Now put the pin in the hole and check again.
What it shows. The pin, inserted through solid plate, overlaps it once. Seated in the Ø10 hole by the two face mates above, the Ø9.5 pin overlaps nothing: it passes through the plate with 0.25 mm clearance. The second check is fresh, not the first one's cached answer.
Tool calls
check_interference({"components": ["clash_plate-1", "clash_pin-1"]})add_mateconcentric and coincident, as in the demo abovecheck_interference({"components": ["clash_plate-1", "clash_pin-1"]})
Drawing packages¶
The drawing-package tools make a complete drawing from a model, and set the scale and BOM on an existing one. Each test checks what SolidWorks reports afterwards, and one failure case.
tests/live/test_live_sw_drawing_package_tools.py
A full drawing package from one call¶

Example prompt: Make an A3 drawing package of this block, drawing number PB-01, with a PDF.
What it shows. One call builds the drawing in seven steps, each shown as it happens: the A3 ISO sheet; third-angle views and an isometric; the scale and layout; the model dimensions, laid out; view captions and notes; an overlap check on the real geometry; and the title block. The drawing and PDF are written, the title block shows AISI 1020 and a weight of about 106 g, and no dimensions overlap. A missing model and a drawing given as the model are both refused.
Tool calls
generate_drawing_package({"model_path": "Package Block.SLDPRT", "output_dir": "drawings", "title": "Package Block", "drawing_number": "PB-01", "author": "Live test"})generate_drawing_package({"model_path": "no_such_part.SLDPRT"}):not_foundgenerate_drawing_package({"model_path": "PB-01.SLDDRW"}):invalid_input
Setting the sheet scale¶

Example prompt: Set this drawing's sheet scale to 1:2.
What it shows. The sheet reads back 1:2, and the 30 mm block shrinks from 30 to 15 mm in every view. A scale of 0:2 is refused.
Tool calls
set_sheet_scale({"numerator": 1, "denominator": 1})set_sheet_scale({"numerator": 1, "denominator": 2})set_sheet_scale({"numerator": 0, "denominator": 2}):invalid_input
A BOM on an assembly drawing¶

Example prompt: Add a BOM to this assembly drawing.
What it shows. The BOM's own cells list both parts, and the table sits on the sheet. An unknown view is refused with the list of views there are.
Tool calls
insert_bom_table({"view_name": "Drawing View1"})insert_bom_table({"view_name": "Side"}):not_found
Drawing dimensions¶
Model dimensions are put on a drawing once each, then laid out so none overlaps another dimension, a view or a note.
tests/live/test_live_sw_documentation_tools.py
Each model dimension shown once¶

Example prompt: Put the model's dimensions on this drawing.
What it shows. The dimensions go on the three orthographic views, each dimension once across the sheet, and the isometric is skipped. An unknown view is refused.
Tool calls
insert_model_dimensions({})insert_model_dimensions({"view_name": "Side"}):not_found
Clearing every overlap¶

Example prompt: Tidy the dimensions on this drawing so nothing overlaps.
What it shows. The test first drags every dimension onto the middle of its view, the worst case. One call moves them all off, with no overlaps left.
Tool calls
insert_model_dimensions({})arrange_dimensions({})
Engineering data¶
Material, custom properties, dimensions, measurements and flat patterns, each read back from SolidWorks.
tests/live/test_live_sw_documentation_tools.py
Material and mass¶

Example prompt: Find AISI 1020 in the material library, apply it to this block and tell me its mass.
What it shows. The material is found, applied and read back. The 30 x 30 x 15 mm block weighs about 0.106 kg. An unknown material is refused.
Tool calls
list_available_materials({"search": "1020"})set_material({"material_name": "AISI 1020"})get_material({})set_material({"material_name": "Unobtainium"}): error
Custom properties¶

Example prompt: Set this part's PartNo property to LIVE-001.
What it shows. The property written is the property read back.
Tool calls
set_custom_property({"name": "PartNo", "value": "LIVE-001"})get_custom_properties({})
Listing dimensions and measuring a face¶

Example prompt: List this part's dimensions and measure the area of its top face.
What it shows. The model's own dimension names, from the sketch and the
extrusion. The top face measures 900 mm², the 30 x 30 sketch. A feature that
does not exist is not_found.
Tool calls
list_model_dimensions({})measure_entities({"entities": ["face:0.015,0.015,0.0"]})list_model_dimensions({"feature_name": "Fillet9"}):not_found
Flat pattern of a sheet-metal part¶

Example prompt: Export this sheet-metal part's flat pattern as a DXF.
What it shows. A copy of SolidWorks' "Simple Sheet Metal Part" sample is flattened and written as a DXF with its header and entities.
Tool calls
export_flat_pattern({"file_path": "flat.dxf"})
A flat pattern of a solid part is refused¶

Example prompt: Export this block's flat pattern as a DXF.
What it shows. A block has no sheet-metal body, so the call is refused
with not_found and a message saying so, and no file is written.
Tool calls
export_flat_pattern({"file_path": "flat.dxf"}):not_found
Holes¶
Source: tests/live/test_live_sw_part_features.py.
A plate of holes, placed from points¶

Example prompt: Drill a 100 x 60 x 15 mm plate: M6 counterbores down both ends, countersinks and tapped holes inside them, a ring of six Ø6 holes in the middle.
What it shows. Holes placed the way you place them by hand in the Hole
Wizard: one hole, then a point in its position sketch for each of the
others. Each create_hole call below is one Hole Wizard feature holding
three holes (hole_count: 3). The counterbores are mirrored about the Right
Plane, and one Ø6 hole is patterned six times round an axis through the
origin. 18 holes in all, and each step's volume change adds up: the plate
goes from 90,000 to 81,745.7 mm³.
| Step | Feature | Volume change (mm³) |
|---|---|---|
| 3 M6 counterbores, 8 mm deep | CBORE for M6 Hex Socket Head Cap Screw1 |
-2,056.7 |
| mirrored to the other end | Mirror1 |
-2,056.7 |
| 3 M6 countersinks, 10 mm deep | CSK for M6 Countersunk Flat Head Screw1 |
-1,458.9 |
| 3 M6x1.0 tapped holes, through | M6 Tapped Hole1 |
-883.6 |
| one Ø6 hole, 10 mm deep | Ø6.0 (6) Diameter Hole1 |
-299.7 |
| five more round the y axis | CirPattern1 |
-1,498.7 (5 x 299.7) |
The last call fails on purpose, and the GIF says so before it runs: one position is 5 mm above the top face. The tool refuses it with the distance, deletes the hole it had started, and the plate's volume doesn't change.
Tool calls
create_hole({"face_point": [-38, 15, -18], "hole_type": "counterbore", "size": "M6", "end_condition": "blind", "depth": 8, "positions": [[-38, 15, 0], [-38, 15, 18]]})mirror_feature({"features": ["CBORE for M6 Hex Socket Head Cap Screw1"], "mirror_plane": "Right Plane", "mirror_bodies": false})create_hole({"face_point": [-22, 15, -18], "hole_type": "countersink", "size": "M6", "end_condition": "blind", "depth": 10, "positions": [[-22, 15, 0], [-22, 15, 18]]})create_hole({"face_point": [22, 15, -18], "hole_type": "tapped", "size": "M6x1.0", "positions": [[22, 15, 0], [22, 15, 18]]})create_hole({"face_point": [10, 15, 0], "hole_type": "simple", "size": "Ø6.0", "end_condition": "blind", "depth": 10})create_axis({"reference": "y"})pattern_circular({"features": ["Ø6.0 (6) Diameter Hole1"], "axis": "Axis1", "count": 6})create_hole({"face_point": [0, 15, 22], "hole_type": "counterbore", "size": "M6", "end_condition": "blind", "depth": 8, "positions": [[0, 20, -22]]}), refused on purpose
Equations¶
Source: tests/live/test_live_sw_equations_wrench.py.
One variable sizes a combination wrench¶

Example prompt: Make a 13 mm combination wrench in chrome-vanadium steel: an open end with its jaw at 15° and a curved jaw bottom, a raised 12-point box end, a flat handle, and fillets where the heads meet it. Letter "solidworksmcp-python" and the size into both faces of the handle. Drive every size from one global variable,
Size, so I can make a 19 mm one by changing one number, then add an 8 mm size as its own configuration.
What it shows. A combination wrench in the usual layout (ISO 3318 /
DIN 3113), modelled from photos of a real one: an open end with its jaw at
15° and a curved jaw bottom, a 12-point box end tilted 15° and raised, a
flat handle, fillets where both heads meet the handle, and 1.8159 (51CrV4)
chrome-vanadium steel from the DIN library. It is built first at fixed
13 mm sizes. Then set_equation adds a global variable Size = 13mm, six
variables computed from it, and an equation on each dimension that sizes
the wrench, including the jaw's ellipse, the ring's lift and the fillet
radii: 25 equations.
| Variable | Expression | Drives |
|---|---|---|
Size |
13mm | the jaw's width; both hexagons of the 12-point opening, across flats; the ellipse, ring lift and fillets as multiples of it |
Length |
"Size" * 12.8 |
the handle bar's length and the box end's pattern spacing (head centre to head centre) |
OpenHead |
"Size" * 2.0 |
the open end's diameter |
BoxHead |
"Size" * 1.55 |
the box end's diameter |
HeadT |
"Size" * 0.5 |
both heads' thickness |
HandleW |
"Size" * 0.9 |
the handle's width (the round bar it is cut from) |
HandleT |
"Size" * 0.3 |
the handle's thickness (two planes "HandleT" / 2 either side of the Top Plane) |
Lettering that reads its own size. add_sketch_text writes
solidworksmcp-python $PRP:"WrenchSize" mm on each face of the handle,
centred on a point; the custom property WrenchSize is linked to a
dimension the equations set to Size, and the part shows whole
millimetres, so the handle reads "13 mm". The text is cut 0.3 mm deep on a
spare block off the open end and a linear pattern moves it onto the
handle's middle; two more equations keep it there at any size
("Size" * 6.48 + 190mm) and keep the block as thick as the handle. The
block is then cut away. SolidWorks doesn't redraw sketch text when an
equation changes the part, so after each size change set_sketch_text
writes the text again, and the handle reads 19 mm, then 8 mm.
Changing Size to 19mm is one call, and the whole wrench regrows. Setting
it to 8mm with configurations: ["8 mm"] changes only that configuration,
so the part holds both sizes. After each change, verify_model checks the
overall size against the hand calculation:
Size |
Expected size, mm (x, y, z) | Measured |
|---|---|---|
| 13 mm, as built | 189.09 x 11.49 x 26 | pass |
| 19 mm, Default | 276.37 x 16.8 x 38 | 276.366 x 16.7985 x 38.0 |
| 8 mm, configuration "8 mm" | 116.36 x 7.07 x 16 | 116.3646 x 7.0731 x 16.0 |
The last call fails on purpose: "Nut" * 2 names a variable that
doesn't exist, so SolidWorks refuses it (equation_refused), the equation
keeps its old text and the wrench stays at 19 mm.
Tool calls
create_part, then the handle: a Right-plane circle sized withadd_sketch_dimension({"dimension_type": "diameter"}),create_extrusionalong x, flattened by twocreate_reference_planeoffsets and aThroughAllcut from each- The box end at the origin: a circle extruded both ways on a plane tilted 15° and lifted
0.13 x Size, then twoadd_polygon({"sides": 6})cuts, the second with"angle": 30, each sized across flats with adiameterdimension create_axis({"reference": "x"}), thenpattern_linearof the box-end features to the handle's far end, and a clearance cut that removes the pattern's seed- The open end at the origin: a Top-plane circle,
create_extrusion({"both_directions": true}) - The jaw: a rectangle on a plane at 15°,
create_cut_extrude({"both_directions": true}), then the curved bottom:add_ellipsewith anangle, its axes sized withadd_sketch_dimension({"dimension_type": "major_axis"})andminor_axis, cut through add_filletwhere both heads meet the handle, faces then sides, andset_material({"material_name": "1.8159 (51CrV4)", "database": "SolidWorks DIN Materials"})list_model_dimensions()to find each dimension's full nameset_equation({"name": "Size", "expression": "13mm"}), then the six variables, then oneset_equationper dimension, thenlist_equations()- The lettering:
set_custom_property(WrenchSizelinked to a Size dimension),add_sketch_text({"text": "solidworksmcp-python $PRP:\"WrenchSize\" mm", "height": 3.5, "center_at": [...]})on each face of a spare block, a 0.3 mm cut,pattern_linearonto the handle's middle, twoset_equationcalls, and a cut that removes the block set_equation({"name": "Size", "expression": "19mm"}),verify_model, thenset_sketch_texton both lettering sketchescreate_configuration({"name": "8 mm"}),set_equation({"name": "Size", "expression": "8mm", "configurations": ["8 mm"]}),activate_configuration({"name": "8 mm"}),verify_model,set_sketch_textactivate_configuration({"name": "Default"}),set_sketch_text, thenset_equation({"name": "Size", "expression": "\"Nut\" * 2"}), refused on purpose
Sketching¶
Source: tests/live/test_live_sw_sketch_essentials.py.
A slotted bracket plate¶

Example prompt: Make a 120 x 80 mm bracket plate, 8 mm thick, centred on the origin. Cut a straight adjustment slot and an arc slot, a keyhole, and a rounded window. Round the left corners R10 and chamfer the right ones 10 mm, as the last features.
What it shows. Every new sketch operation in one part, with the volume checked against the hand calculation after each step:
| Step | Tools | Expected, mm³ | Measured, mm³ |
|---|---|---|---|
| A 120 x 80 plate drawn from its centre, extruded 8 mm | add_rectangle from_center |
76,800.00 | 76,800.00 |
| A straight slot and an arc slot, with two construction lines across them | add_slot, add_line construction, set_construction_geometry |
71,358.94 | 71,359.18 |
| A keyhole: two lines extended up to a circle, the arc between them trimmed, the neck's corners rounded and bevelled | sketch_extend, sketch_trim, add_sketch_fillet, add_sketch_chamfer |
68,938.11 | 68,938.53 |
| A window from a line, a tangent arc, a line and a three-point arc | add_arc kind |
65,909.79 | 65,910.22 |
| Last: two corners filleted R10, two chamfered 10 mm | add_fillet, add_chamfer |
64,766.42 | 64,766.85 |
The plate is built sharp and its corners are treated last: fillets and chamfers on a solid belong at the end of the feature tree, where a later cut can't break them. The sketch fillet and chamfer round and bevel corners of a 2D outline, here the keyhole's neck.
The construction lines cross both slots; had either been normal geometry,
the cut would have removed a different volume. The first call fails on
purpose: a rectangle drawn from its centre has a centre point, and a
fillet there is refused as invalid_input ("it isn't where two entities
meet").
Tool calls
create_part,create_sketch({"plane": "Top"}),add_rectangle({"x1": 0, "y1": 0, "x2": 60, "y2": 40, "from_center": true})add_sketch_fillet({"corners": [[0, 0]], "radius": 5}), refused on purposeexit_sketch,create_extrusion({"depth": 8})add_slot({"start": [-40, -15], "end": [-40, 15], "width": 10})andadd_slot({"kind": "arc", "center": [25, 0], "start": [39.142, -14.142], "end": [39.142, 14.142], "width": 8})add_line({..., "construction": true}),add_line,set_construction_geometry({"entities": ["Line_4"]}), thencreate_cut_extrude({"end_condition": "ThroughAllBoth"})add_circle, threeadd_line,sketch_extend({"point": [-3, -0.5]})and at[3, -0.5],sketch_trim({"point": [0, 2]}),add_sketch_fillet({"corners": [[-3, -15]], "radius": 1.5}),add_sketch_chamfer({"corners": [[3, -15]], "distance": 1.5}), cut throughadd_line,add_arc({"kind": "tangent", ...}),add_line,add_arc({"kind": "three_point", ..., "through_x": -25, "through_y": 30}), cut throughadd_fillet({"radius": 10, "edge_names": [two corner edges]}),add_chamfer({"distance": 10, "edge_names": [two corner edges]})verify_model({"volume_mm3": ...})after each step
Assemblies¶
Source: tests/live/test_live_sw_assembly_depth.py.
A pinned base, exploded and ballooned¶

Example prompt: Build a 120 x 60 x 8 mm base with a foot under its right end and one 8 mm pin, then pattern the pin to four, 30 mm apart. Mirror the foot to the other end and swap the pins for 45 mm ones. Explode the pins 40 mm up and make an exploded drawing with a BOM and balloons.
What it shows. Every new assembly tool, each step checked by the component count and the assembly's bounding box:
| Step | Tools | Components | Size, mm |
|---|---|---|---|
| A base, a 30 mm pin and a foot; the pin patterned to four, 30 mm apart along x | create_axis, pattern_components |
6 | 120 x 44 x 60 |
| The foot mirrored about the Right Plane | mirror_components |
7 | 120 x 44 x 60 |
| Every pin swapped for the 45 mm pin: 15 mm taller | replace_component all_instances |
7 | 120 x 59 x 60 |
| The base hidden, shown and made transparent | set_component_state visible, transparent |
7 | |
| The pins lifted 40 mm; collapsed and exploded again | create_exploded_view, set_exploded_view |
7 | 59 high, then 99 |
| An exploded isometric view, a BOM (4 rows) and one balloon per part (3) | create_drawing_view exploded, insert_bom_table, add_balloons |
The first swap fails on purpose: a file that doesn't exist is refused
as invalid_input before anything changes. insert_component places each
part by its centre, and the pattern runs along the axis's own direction
(toward -x for an x axis), so the seed pin stands at the right end.
Tool calls
create_part,create_sketch,add_rectangleoradd_circle,exit_sketch,create_extrusion: the base, two pins and the foot, savedcreate_assembly,insert_componentx 3 (by centre),create_axis({"reference": "x"}),pattern_components({"components": ["pin30-1"], "axis": "Axis1", "count": 4, "spacing": 30})mirror_components({"components": ["foot-1"], "plane": "Right Plane"})replace_componentwith a missing file, refused on purpose; thenreplace_component({"component": "pin30-1", "file_path": "...pin45.SLDPRT", "all_instances": true})set_component_state({"component": "base-1", "visible": false}),visible: true,transparent: truecreate_exploded_view({"steps": [{"components": [the four pins], "direction": "y", "distance": 40}]}),set_exploded_view({"exploded": false}), thentruecreate_drawing,create_drawing_view({"view_type": "isometric", "exploded": true}),insert_bom_table,add_balloons({"view_name": "Drawing View1", "layout": "square"})verify_modelafter each step
Run a demo yourself¶
The demos need Windows, SolidWorks open and idle, and the project's .venv.
live_demo.ps1 runs one test, paced so you can follow it in SolidWorks, and
closes every open document first.
# Watch it run
powershell -ExecutionPolicy Bypass -File tests\scripts\live_demo.ps1 `
-Test tests/live/test_live_sw_readme_demo.py
# Save a captioned frame per call and build a GIF
powershell -ExecutionPolicy Bypass -File tests\scripts\live_demo.ps1 `
-Test tests/live/test_live_sw_readme_demo.py -CaptureDir docs/assets/demos/readme
# Also record the window and build the sped-up motion GIF
powershell -ExecutionPolicy Bypass -File tests\scripts\live_demo.ps1 `
-Test tests/live/test_live_sw_readme_demo.py -CaptureDir docs/assets/demos/readme -Record
With -Record, a 10 s countdown comes first: bring SolidWorks to the front
and leave it uncovered, as the recorder copies the screen.
The repository also has standalone demo scripts, which build a part without the test harness:
| Script | What it builds |
|---|---|
scripts/demo_sketches.py |
A decorative plate using every sketch tool: splines, arcs, polygons, ellipses, patterns, mirror, offset |
scripts/demo_features.py |
A revolved ring with a cut slot, a fillet and a chamfer |
scripts/demo_sweep_loft.py |
A lofted cone and a swept coil spring in one multibody part |
scripts/demo_analysis.py |
Model info, features, configurations and mass properties read back, and a dimension read and changed |
scripts/demo_export.py |
One part exported to STEP, STL, IGES and PNG |
scripts/demo_monitor_stand.py |
The arched monitor stand, as finished or at any size, through the MCP tools |
scripts/demo_save_validation.py |
Saving refuses a missing folder and an existing file unless overwrite is set |
demo_recording_heat_insert.py |
A recording-friendly build that prints the prompt and its own source first |
list_features_assembly_demo.py |
list_features on a part and an assembly from the SolidWorks sample set |
Run a script with .\.venv\Scripts\python.exe scripts\demo_sketches.py.