Skip to content

Drawing sheets: list, add and activate - #286

Merged
andrewbartels1 merged 9 commits into
mainfrom
feat/drawing-sheets
Nov 30, 2026
Merged

andrewbartels1 merged 9 commits into
mainfrom
feat/drawing-sheets

Conversation

@andrewbartels1

Copy link
Copy Markdown
Owner

Drawing sheets: the first part of queue item 37. Three new tools, all in beta.

The tools

  • list_sheets: each sheet's name, paper size, scale, projection, and which one is active. Sheets are read without switching between them.
  • add_sheet: a new sheet with a format (default a3 - iso), paper size, scale and projection, made active. The projection defaults to the active sheet's.
  • activate_sheet: makes a sheet active by name, ignoring case.
  • A name already in use, or a sheet that doesn't exist, is refused with the list of sheets.

Probe and live test (SolidWorks 2026 SP4)

  • The probe settled the sheet calls: GetSheetNames, GetProperties2, NewSheet4 with a custom format, and ActivateSheet. Details in design.md.
  • The live test passes:
    • Sheet1 with a front view;
    • on purpose, a second sheet named "sheet1" is refused;
    • an A2 "Details" sheet at 1:2 becomes active and gets an isometric view;
    • back to Sheet1 with "SHEET1".

One finding to note: create_drawing_view rescales the active sheet to fit its view, so Details read 5:1 after its view was placed. That is the existing tool's behaviour, not these tools'. Whether it should keep a scale you set is listed as a question.

Spec: openspec/changes/drawing-sheets/.

Checks

  • ruff and mypy are clean.
  • 4,961 unit tests pass, with coverage at 100%.
  • The strict docs build is clean.

This PR touches the same lists as #284 and #285 (tool counts, registration, the layer tests). Whichever merges later needs a small merge; I'll do it.

…and three views on Sheet1, an isometric on a 2:1 Details sheet
… for the base, Right for the upright), where create_hole's point pick lands on the point
…hrough both ways, which no view affects; the base's holes stay create_hole from the Top view
…idWorks rescales it to 2:1 until create_drawing_view keeps the scale) and moves the views clear of the title block
…Details sheet) in Demos, with its GIF; the drawing-sheets demo task done
# Conflicts:
#	CHANGELOG.md
#	README.md
#	docs/assets/progress/progress.json
#	docs/assets/progress/progress.svg
#	docs/assets/progress/tables.html
#	docs/assets/progress/tool-list-size.md
#	docs/demos.md
#	docs/index.md
#	docs/llms.txt
#	docs/user-guide/tool-catalog/index.md
#	docs/user-guide/tools-overview.md
#	mkdocs.yml
#	openspec/queue.md
#	src/solidworks_mcp/adapters/base.py
#	src/solidworks_mcp/adapters/circuit_breaker.py
#	src/solidworks_mcp/adapters/connection_pool.py
#	src/solidworks_mcp/adapters/mock_adapter.py
#	src/solidworks_mcp/adapters/pywin32_adapter.py
#	src/solidworks_mcp/tools/error_classifier.py
#	src/solidworks_mcp/tools/tool_hints.py
#	tests/solidworks_mcp/tools/test_error_classifier.py
@andrewbartels1
andrewbartels1 merged commit c7838bc into main Nov 30, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant