AI agent getting started? Read Agents: start here first.
An Onshape connection imports documents into its own connector-managed import project. Open the organisation’s Connections page in the web app to see its connections.
Everyone with access to this project sees every document this Onshape account can see.
The connector commands require an organisation selected for CLI commands. Creating a connection needs the owner role, including authority to administer projects and service identities. Other commands state their required capabilities in openeng help connector <command>.
Create the mirror
Section titled “Create the mirror”Have the Onshape company ID and account keys ready. Create a connection by choosing the company to import:
openeng connector create --system onshape --stack cad --name "Onshape mirror" --company <company-id>The command prints the connection ID, the mirror project ID and whether it drafted types. The mirror project holds the imported copy.
- If the command drafted types, inspect them with
openeng types draft show --change-set <id> --project <mirror-project-id>. - Accept the reviewed revision with
openeng types draft accept --change-set <id> --revision <revision>before the first import. - If a shared draft of the organisation’s proposed schema and view changes is already open, review it. If the types are already approved, no draft is needed.
Import the first documents
Section titled “Import the first documents”- Run
openeng connector set-credential <connection>and enter the Onshape keys at its terminal prompt. - Run
openeng connector run <connection>to start the import. - Run
openeng connector runs <connection>to inspect the run result. - Open the returned mirror project and inspect the imported records and product structure.
Confirm the expected documents are present before sharing the mirror project. Imported types are connector-owned: make changes in Onshape and import again, rather than editing those records directly.
Run later imports
Section titled “Run later imports”Use openeng connector run <connection> again, then inspect the latest run. If an import fails, read its result before retrying. Check credentials and whether required type definitions were published. Revoke the connection when it should no longer be used.
Commands
Section titled “Commands”See CLI reference for flags and output.
openeng connector createcreates the connection, mirror project and service identity.openeng connector set-credential <connection>stores the Onshape keys entered at a terminal prompt.openeng connector draft-types <connection>drafts types for review.openeng connector revoke <connection>revokes the connection.openeng connector run <connection>starts an import run.openeng connector runs <connection>lists import runs.
Run openeng help connector for exact flags and output shapes. Review and accept drafted types with openeng types draft.