Custom features in Onshape can help streamline the complex process of wire and harness routing through a comprehensive, process-driven workflow. Created using Onshape’s open programming language, called FeatureScript, these tools automate repetitive tasks that traditionally require extensive manual work.
This suite of wiring custom features combines the best capabilities from previous iterations into an integrated workflow that supports the entire wiring process. It allows you to import wire data directly from 2D electrical schematic software via CSV files, manage cable and wire routing efficiently through 3D space, and generate accurate wire length tables.
In this Tech Tip, we’ll go through a complete wiring workflow while exploring the custom features that aid in the process:
Find the custom features used in this workflow:
1. Building a Wire Connector Library
Wire connector is a custom feature that allows you to create a connector library that serves as a centralized repository for reusable components. In Onshape, you can:
-
Import or model connectors natively with no restriction on orientation. Assign face colors instead of part colors to ensure consistency. Define insertion points with mate connectors to standardize positioning
-
Distinguish between terminals and connectors. A terminal takes a single wire, whereas a connector accommodates multiple wires
Once a connector is defined, it is stored as a composite part, allowing easy reuse and version control.
2. Creating Wire Clips for Routing
Wire clip is a custom feature that uses waypoints to guide wires along the correct path. These waypoints can be:
-
Physical clips
-
Holes in bulkheads
-
Cable trays or channels
In Onshape, predefined clip features help engineers place routing points consistently across multiple assemblies. Engineers can set up:
-
Clip axes for wire entry and exit points
-
Axes offsets to manage wire extents
-
Vertical offsets to prevent interference with other parts in the assembly
3. Automated Wire Routing from a CSV File
One of the most powerful aspects of Onshape’s wire routing solution is its ability to import a from-to wire list from a CSV file. This file can be created manually in a spreadsheet program, like Microsoft Excel or in 2D electrical schematic software like CADONIX, and then exported.
CSV File Requirements
A standard CSV file for automatic wire routing should include:
-
Wire ID (Unique identifier)
-
From and To References (Connector names and pin numbers)
-
Wire Geometry (Diameter, cross-sectional area, gauge, insulation thickness)
-
Bend Radius (Minimum bend constraints)
-
Wire Color (RGB, HEX, or named color)
Wire data can also be defined manually for each route if no CSV file is available.
4. Setting Up the Cable/Wire Environment
The Wire route custom feature is used to start wire routing. Before using it, Onshape requires an assembly context:
-
Create a Part Studio in Context to capture assembly geometry
-
Import the CSV data to generate an automated reference table
-
Define units and column mappings within Onshape’s Variable Studio
A custom reference table is created, providing:
-
A connector reference list (sorted alphabetically)
-
A from-to wire list is automatically populated from the CSV file
-
Real-time error detection for missing or incorrectly formatted data
5. Inserting Connectors and Assigning References
Once connectors are set up, engineers can:
-
Insert predefined connectors from the library
-
Assign reference points by selecting predefined pin locations
-
Automatically associate wires to predefined designations like Live, Neutral, and Earth
This setup ensures that connectors are consistently referenced, reducing the chance of miswiring.
6. 3D Wire and Harness Routing
With the connectors and references in place, Onshape enables:
-
Automated shortest-path routing between terminals
-
Wire bundling and harnessing for multi-wire cables
-
Use of clips and waypoints for structured routing
-
Real-time bend radius checks to avoid violations
Onshape’s system intelligently follows pre-defined paths while providing full manual override options. Engineers can edit wire paths using:
-
Tangent and endpoint manipulators for precise routing
-
Wire bundling features to group related cables
-
Splice points to define branching harnesses
Additionally, real-time curvature combs help detect problematic bends.
A Note on 2D Drawings: There’s no method currently available to automatically create a flattened cable or nail board drawing from the routes. However, the table data generated by the custom features can easily be added to drawings, and schematic representations of the cable or harness can be created with Onshape 2D drawing tools.
Onshape on YouTube
Subscribe to our channel to stay up-to-date on new product releases, Onshape Tech Tips, and more!