swpilotcli-ActionGroup-replace-notes
Prerequisites
- SolidWorks is running
- Target folder exists and contains .slddrw files
What this Skill does
- Scans the source folder for all
.slddrwfiles (root only, no subdirectories) - For each drawing:
- Opens it silently
- Iterates all sheets → views → Note annotations
- Replaces every occurrence of
<find>with<replace> - If any notes were changed: saves a copy to the output folder with a filename suffix
- Closes the drawing without saving (original is untouched)
- Reports a summary of all modified files
When to use
Use when the user wants to batch-update note text across many drawings in one operation.
For single-file note replacement, use swpilotcli-replace-note-text instead.
Quick start
dotnet run --project ./sup_tools/swpilotcli-ActionGroup-replace-notes/scripts/ReplaceNotes/ReplaceNotes.csproj -- "<sourceFolder>" "<outputFolder>" "<find>" "<replace>" "<suffix>"
Examples
# Replace 頂峰 with 廠商, save copies to a subfolder with _廠商 suffix
dotnet run --project ... -- "H:\drawings" "H:\drawings\output" "頂峰" "廠商" "_廠商"
Arguments
| # | Name | Description |
|---|------|-------------|
| 1 | sourceFolder | Folder containing source .slddrw files |
| 2 | outputFolder | Folder where modified copies are saved (created if not exists) |
| 3 | find | Text to search for (case-sensitive) |
| 4 | replace | Replacement text |
| 5 | suffix | Filename suffix added before .slddrw extension |
Notes
- Original files are never modified.
- Output folder is created automatically if it does not exist.
- Only root-level .slddrw files are processed (no subdirectory recursion).
- Drawings with no matching notes are skipped (no copy saved).