create_sketch_rectangle
Creates a rectangular sketch on a specified plane or face using two corner points, with optional variable dimensions.
Instructions
Create a rectangular sketch in a Part Studio. Sketch location: pass either plane (standard datum: Front/Top/Right) or faceId (deterministic ID of a face from list_entities). Pass faceId to sketch on an existing part face; if both are given, faceId wins and a warning is returned.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"documentId": "<documentId>",
"workspaceId": "<workspaceId>",
"elementId": "<elementId>",
"corner1": "<corner1>",
"corner2": "<corner2>"
},
"name": "create_sketch_rectangle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Sketch name | Sketch |
| plane | No | Standard datum plane. Defaults to Front if neither plane nor faceId is given. | |
| faceId | No | Deterministic ID of an existing face to sketch on (get from `list_entities`). Mutually exclusive with `plane`; wins if both given. | |
| corner1 | Yes | First corner [x, y]. Bare numbers are mm; use strings like "10 mm" or "0.5 in" for explicit units. | |
| corner2 | Yes | Opposite corner [x, y]. Same convention as corner1. | |
| elementId | Yes | Part Studio element ID | |
| documentId | Yes | Document ID | |
| workspaceId | Yes | Workspace ID | |
| variableWidth | No | Optional variable name for width | |
| variableHeight | No | Optional variable name for height |