create_extrude
Creates an extruded 3D feature from a selected sketch, with control over depth, direction, and operation type (new, add, remove, intersect).
Instructions
Create an extrude feature from a sketch
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Extrude name | Extrude |
| depth | Yes | Extrude depth. Bare numbers are mm (CAD default); use "15 mm", "0.5 in", "0.03 m" etc. for explicit units. | |
| endType | No | End condition. BLIND: extrude one direction, `depth` is the length. SYMMETRIC: extrude both sides of the sketch plane, `depth` is the TOTAL length (depth/2 each side). Use SYMMETRIC to avoid building two mirrored BLIND extrudes for features that should straddle their sketch plane. | BLIND |
| elementId | Yes | Part Studio element ID | |
| documentId | Yes | Document ID | |
| workspaceId | Yes | Workspace ID | |
| operationType | No | Extrude operation type | NEW |
| variableDepth | No | Optional variable name for depth | |
| sketchFeatureId | Yes | ID of sketch to extrude | |
| oppositeDirection | No | If true, extrude in the direction OPPOSITE the sketch normal. For REMOVE on a sketched picked face this tool auto-flips to true regardless of what you pass — because the default (sketch-normal direction) cuts AWAY from the material and silently removes nothing (Onshape returns featureStatus=INFO). Use `forceOppositeDirection: false` to override the auto-flip if you actually need the non-default direction (rare). | |
| forceOppositeDirection | No | Escape hatch that disables the REMOVE+faceId auto-flip. Pass true/false to bypass the heuristic entirely. Only use this for the unusual case of deliberately cutting away from the picked face (e.g. through from underneath). Leaving this absent is correct 99% of the time. |