create_linear_pattern
Creates a linear pattern of selected features along a specified edge direction. Requires an edge ID to determine orientation and a distance and count for spacing.
Instructions
Create a linear pattern of features. Requires a deterministic edge id whose direction the pattern will follow — Onshape has no implicit world-X axis usable here. Workflow: create a reference (a sketch line on any plane pointing the direction you want, or pick an existing body edge via list_entities), then pass its id as directionEdgeId.
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>",
"featureIds": "<featureIds>",
"distance": "<distance>",
"directionEdgeId": "<directionEdgeId>"
},
"name": "create_linear_pattern"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Pattern name | Linear pattern |
| count | No | Total number of instances | |
| distance | Yes | Distance between pattern instances. Bare numbers are mm; use "10 mm" / "0.5 in" for explicit units. | |
| elementId | Yes | Part Studio element ID | |
| documentId | Yes | Document ID | |
| featureIds | Yes | Feature IDs to pattern | |
| workspaceId | Yes | Workspace ID | |
| directionEdgeId | Yes | Deterministic id of an edge whose direction the pattern follows. Get from list_entities(kinds=['edges']) on an existing body, or from a sketch line you drew specifically as a reference. Required. |