entity_create_line
Creates a linear segment between two WCS endpoints, with optional layer or color, and returns the new backend object identifier.
Instructions
Create a LINE from two WCS endpoints in drawing units, optionally on a layer/color, and return the new backend object identifier.
Side-effects: Mutates active drawing state, advances document fingerprint. Disambiguation: Use entity_create_line for discrete linear segments in WCS; use entity_create_polyline for joined multi-segment paths.
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": "entity_create_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Start X coordinate in WCS drawing units | |
| x2 | Yes | End X coordinate in WCS drawing units | |
| y1 | Yes | Start Y coordinate in WCS drawing units | |
| y2 | Yes | End Y coordinate in WCS drawing units | |
| z1 | No | Start Z coordinate in WCS drawing units (default: 0.0) | |
| z2 | No | End Z coordinate in WCS drawing units (default: 0.0) | |
| color | No | AutoCAD Color Index (ACI 1-255). Uses ByLayer if omitted | |
| layer | No | Target layer name. Uses active layer if omitted |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||