create_sketch_line
Create a line sketch directly on a chosen plane or existing face in Onshape. Pass start and end points with optional units to define geometry for parametric CAD.
Instructions
Create a line sketch. Pass either plane (Front/Top/Right) or faceId (from list_entities) to choose the sketch surface. faceId wins when both are given.
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. | |
| endPoint | Yes | End point [x, y]. Same convention as startPoint. | |
| elementId | Yes | Part Studio element ID | |
| documentId | Yes | Document ID | |
| startPoint | Yes | Start point [x, y]. Bare numbers are mm; use "10 mm" / "0.5 in" for explicit units. | |
| workspaceId | Yes | Workspace ID |