Skip to content
Back to skills

Solidworks Hole Wizard

ASecurity

Create correct SolidWorks Hole Wizard holes (clearance, tapped blind or through, dowel H7) through the SolidWorks MCP bridge with verified HoleWizard5 parameters, callout-style names, metadata and checks. Use whenever a part has holes, threads (M6-6H etc.), dia THRU callouts or dowel/reamed holes, or the user asks for Hole Wizard, hole callouts or hole metadata, even if they only say 'add the holes'.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsgo

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add Cloud-Cad-Ai/solidworks-mcp --skill solidworks-hole-wizard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Solidworks Hole Wizard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Solidworks Hole Wizard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cloud-cad-ai-solidworks-hole-wizard/badge)](https://www.skillsdirectory.com/skills/cloud-cad-ai-solidworks-hole-wizard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "solidworks-hole-wizard"
description: "Create correct SolidWorks Hole Wizard holes (clearance, tapped blind or through, dowel H7) through the SolidWorks MCP bridge with verified HoleWizard5 parameters, callout-style names, metadata and checks. Use whenever a part has holes, threads (M6-6H etc.), dia THRU callouts or dowel/reamed holes, or the user asks for Hole Wizard, hole callouts or hole metadata, even if they only say 'add the holes'."
---

# Hole Wizard through the MCP bridge

Read `solidworks-bridge-tool-selection` first. Lengths are metres, angles radians. Verified on SOLIDWORKS 2026 by reading values back from the feature definition.

Model every functional hole (clearance, tapped, dowel, counterbore, countersink) as a Hole Wizard feature, not an extruded cut. A cut stores only a cylinder. Hole Wizard stores the thread, class, tap drill, depths and cosmetic thread, so drawing callouts, hole tables, CAM and PDM read the real intent. Plain cuts are fine for slots, pockets, lightening holes and odd profiles.

Enum values, argument arrays, thread and fit tables: [references/hole-data.md](references/hole-data.md).

## 1. Decode the callout

| Callout | Type | End |
|---|---|---|
| Ø15 THRU (bolt clearance) | Hole (2), ISO drill sizes (143), `Ø15.0` | Through All (1) |
| Ø5 ↧18 / M6-6H ↧12 | Tap (4), ISO tapped hole (147), `M6x1.0` | Blind (0) |
| Ø5 THRU / M6-6H THRU | Tap (4), 147, `M6x1.0` | Through All (1), thread through |
| Ø8 H7 THRU (dowel) | Hole (2), 143, `Ø8.0` | Through All (1), H7 as metadata |

- The Ø line with ↧ is the drill depth. The M line with ↧ is the thread depth. Drill depth ≥ thread depth. Read both from the drawing; do not assume thread depth = 2×D.
- For a clearance hole, compare the diameter with ISO 273 and state the fit (close, medium, coarse) in the feature name.
- If the size or depth is unclear, ask. Do not guess a standard size.

## 2. Procedure (per hole group)

1. **Handles.** `active_document`, then `get_property` for `Extension` and `FeatureManager`. Re-read them after any `ActivateDoc` or error.
2. **Pick the face with a ray** at the first hole centre, aimed from outside the part: `Extension.SelectByRay(x,y,z, dx,dy,dz, 0.0005, 2, false, 0, 0)`. `SelectByID2` picks on edges and corners are unreliable.
3. **Call `HoleWizard5`** on the FeatureManager with the argument array from the reference. A non-null feature means success.
4. **Add the other centres in the position sketch.** Several ray picks on one face collapse into one location. Instead: `feature.GetFirstSubFeature()` gives the sketch. Call `Select2(false,0)`, then doc `EditSketch`. On the SketchManager, set `AddToDB = true`, call `CreatePoint(x,y,0)` for each extra centre, then set `AddToDB = false`. Finish with `InsertSketch(true)` and `EditRebuild3`. Sketch axes depend on the face; on a face parallel to Top they are x = model X and y = −model Z. Confirm with one point before adding the rest.
5. **Name the feature like the callout**, for example `M6x1.0-6H Tapped Dp12, Dia5 Dp18` or `4x Dia15 THRU - M14 Close Clearance`.
6. **Verify** (section 3) before the next group.
7. **Metadata.** Call `set_custom_properties` on its own, not in a batch, with one key per group, for example `Holes_A1-A4 = "4x M6x1.0-6H THRU, Tap Drill Dia5.0 THRU"`. Then `save("")`.

## 3. Verify every hole group

- **Readback.** Call `feature.GetDefinition()`, then `get_property` on these:
  - Blind tap: `TapDrillDiameter`, `TapDrillDepth`, `ThreadDepth`, `CosmeticThreadType`, `ThreadEndCondition`, `DrillAngle`.
  - Through tap: `ThruTapDrillDiameter`. `TapDrillDiameter` and `ThreadDepth` read 0 for through holes, which is normal.
  - If `ThreadDepth` equals 2×D when you asked for something else, the thread-depth slot was ignored.
- **Volume** with `mass_properties`. A through hole removes π r² t. A blind drilled hole removes π r² d plus the drill-point cone (π/3) r³ / tan 59°. The centre of gravity shifts away from the side with the holes; a symmetric pattern keeps it on the axis.
- **Position by rays.** A pattern rotated 90° gives the same volume and centre of gravity, so fire `SelectByRay` (radius 0.0003) down each intended centre; it must return false because it falls through the hole. Then fire one control ray at a swapped position (x↔z); it must return true because it hits solid.
- `feature_errors` reports nothing. In an assembly, run `ForceRebuild3` and then `check_interference`.

## 4. Pitfalls

- Thread depth goes in V1, not `Length`. The wrong slot silently gives the 2×D default.
- All −1 in the V slots of a plain hole (type 2) makes `HoleWizard5` return nothing. Use the recorder-style values from the reference.
- The cosmetic thread is created only when V7 = 1 or 2. Without it the drawing shows no thread.
- `SSize` must match the standard table exactly (`M6x1.0`, `Ø15.0`; Ø is U+00D8).
- H7 and other tolerances are not applied by Hole Wizard: they need a dimension object, which the bridge cannot pass. Put the tolerance in the feature name and custom properties, and list it as an open item for the drawing. Use `solidworks-macro-fallback` only if the user agrees.
- `EditUndo2` can undo creations you did not intend, and names shift. Re-read the feature tree after every undo.
- When replacing old cut-holes, `DeleteSelection2(1)` can leave sketches and reference planes behind. Delete them by name (`FeatureByName`, `Select2`, `EditDelete`), then check the volume is back to the un-holed value.
- Not allowed inside a batch: `create_directory`, `set_custom_properties`, `save_as`, `set_units`.

## 5. Report to the user

- Every functional hole is a Hole Wizard feature with a callout-style name.
- Readback matches the drawing: drill diameter and depth, thread, thread depth, end condition, cosmetic thread.
- The volume and ray checks passed.
- Custom properties list the hole callouts.
- Part saved; any STEP export is redone; any assembly is rebuilt and checked for interference.
- Open items, for example "H7 tolerance to be added on the drawing".

Files in this skill

  • SKILL.md5.9 KB
  • references/hole-data.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.