capture_view
Capture a PNG of the active SOLIDWORKS document's graphics view to inspect the model visually, with optional section cut, region, zoom, custom camera direction, and file output.
Instructions
Capture a PNG of the active document's graphics view, to inspect the model visually: a standard view, or a camera direction with an up direction (the default up is +Y; for a Z-up model give up = {x:0, y:0, z:1}). A picture wider or taller than 1280 pixels is written to output_path only, not sent back. A section cut by a plane can be added for the capture only. To see detail, return only part of the picture: region (fractions from the top left) or zoom (1-20, on the centre). The screen is left as it was: the on-screen view is restored afterwards, whatever view or zoom_to_fit was used.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "capture_view"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| up | No | With direction: the model direction that points up in the picture (default +Y) | |
| unit | No | Unit of the section offset (mm, cm, m, inch or ft) | |
| view | No | View orientation ('current' keeps what is on screen) | current |
| zoom | No | Instead of region: enlarge the centre of the picture by this factor (1-20) | |
| width | No | Exact picture width in pixels (64-4096) | |
| height | No | Exact picture height in pixels (64-4096) | |
| region | No | Only this part of the picture, in fractions (0-1) from the top left, at full resolution | |
| section | No | Cut the model with a plane for this capture only | |
| max_size | No | Longest side in pixels (256-1280), when width / height are not given | |
| direction | No | Instead of view: where the camera is, seen from the model, in model axes. {0,0,1} = front view, {1,1,1} = an isometric view. | |
| output_path | No | Also write the PNG to this file on the computer, e.g. C:\Work\door.png | |
| zoom_to_fit | No | Zoom to fit before capturing | |
| return_image | No | false = do not send the picture back, only write the file | |
| hide_annotations | No | Hide dimensions, notes, planes, axes, origins and sketches for the capture | |
| white_background | No | Plain white background for the capture |