Validate a Part Studio
onshape_validate_part_studioValidate a Part Studio by counting parts and bodies, failing when counts differ from expected values to catch regressions after feature edits.
Instructions
Count parts and bodies, and fail when the counts do not match the expectations you pass. A cheap regression check after a run of feature edits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ws | Yes | Workspace id — the <ws> segment of the document URL. | |
| doc | Yes | Document id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>. | |
| elem | Yes | Element id (tab) — the <elem> segment of the document URL. | |
| expect_parts | No | Fail unless the Part Studio has exactly this many parts. | |
| expect_bodies | No | Fail unless it has exactly this many bodies. |