draw_line
Adds a line to an open SOLIDWORKS sketch at exact coordinates without snapping or automatic relations, joining shared endpoints and returning the new entity ID.
Instructions
Add a line to the open sketch at exactly the coordinates given: no snapping and no automatic relations. Lines that share an endpoint are joined. In a part, a line that touches nothing when the sketch is closed gets its length as a dimension (a line in a chain does not). Returns the id of the new entity.
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": {
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "draw_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | X of the start point | |
| x2 | Yes | X of the end point | |
| y1 | Yes | Y of the start point | |
| y2 | Yes | Y of the end point | |
| unit | No | mm, cm, m, inch or ft |