create_mate_connector
Creates a mate connector at the center of a selected face in an Onshape assembly, with configurable offsets and axis orientation.
Instructions
Create an explicit mate connector on a face of an assembly instance. The connector is placed at the face center with its Z-axis along the face normal. Offsets are in the connector's LOCAL coordinate system (X/Y in-plane, Z along normal). Flipping the Z-axis also reverses the other axes via the right-hand rule, which affects how offset translations map to world space.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Mate connector name | Mate connector |
| faceId | Yes | Face deterministic ID (from Part Studio body details) | |
| offsetX | No | X offset from face center in inches | |
| offsetY | No | Y offset from face center in inches | |
| offsetZ | No | Z offset (along face normal) from face center in inches | |
| elementId | Yes | Assembly element ID | |
| documentId | Yes | Document ID | |
| instanceId | Yes | Instance ID to attach the connector to | |
| flipPrimary | No | Flip the primary (Z) axis direction | |
| workspaceId | Yes | Workspace ID | |
| secondaryAxisType | No | Reorient secondary axis | PLUS_X |