Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Custom Feature: Cable/Wire Routing
Comments
-
@Seymur_Dadashov - I'm guessing it didn't create the composite part? The error is less than helpful in this case. If you can create a support ticket and share the doc (or a simplified copy of it) that would be very helpful.
Senior Director, Technical Services, EMEA0 -
@Seymur_Dadashov I've found the issue which I didn't know was a limitation. When setting the harness/cable/wire name it can't exceed 256 characters. Quick fix is to add a cable ID in the dialog to reduce the length of the name or reduce the length of the wire names in the CSV. Long term fix, not sure I'll have to think about it.
@setProperty: Name cannot exceed 256 characters Harness: Internal_Input_VCC/Internal_Input_GND/Internal_Input_TP1/Internal_Input_TP2/Internal_Input_MA+/Internal_Input_MA-/Internal_Input_SLO+/Internal_Input_SLO-/Internal_Output_VCC/Internal_Output_GND/Internal_Output_TP1/Internal_Output_TP2/Internal_Output_MA+ Length = 262
Senior Director, Technical Services, EMEA0 -
@NeilCooke
I did see the really long name forming but didnt realize it would break the script haha.It does resolve the issue with the different cable ID on my end, thank you sir!
Debugging has resulted in some funny mistakes though. For example, the color "Purple" if entered into the from-to list doesnt actually get recognized either. I defaulted to hex color codes for more control although it requires a bit more attention at the excel level. Took a while to figure out it was the color breaking everything.0 -
Try magenta 😅Senior Director, Technical Services, EMEA0
-
I'm new to this so apologies for any obvious oversights. Is it necessary to define a new unique wire name and unique reference in the CSV file for every single connection? I'm connecting 6 wires to a microcontroller and then it goes from that microcontroller to the next one. Every single wire is the exact same and I wish to simply reuse the already defined wires but that's impossible. There's a lot of these microcontrollers and I would have to define over 200 wires and it just seems so unnecessarily complex for such a simple task. For example the feature RS Cable allows you to simply click on two mates and it connects them with a cable. Why shouldn't something like this be possible here? Thanks.
0 -
Thanks so much for this fantastic featurescript @NeilCooke - I'm blown away by its capabilities and applications!
Do you have a suggested workaround for daisy-chained cables where one connector end is in part studio A and the other end in part studio B, and you want to route a wire between these connectors? Since the assembly in question has multiple subsystems, it would be quite slow deriving everything into a new part studio and doing everything there. We alternatively are considering adding some virtual connectors to show where the wire interfaces from part studio A to B. Then we could add up the lengths of wires in both to get the true length, but this introduces an extra manual step...
Additionally, what would you suggest for wires routed from connectors whose positions are dynamic (accounting for rotary or linear movement changing the distance between the connectors?)0 -
Glad you like it @Kritika
Cables do have to be in the same part studio, but maybe what you could do is position everything in the top level assembly showing the connectors final positions and then in the wiring part studio, add connectors over the top of them? Unless I am misunderstanding.
There is no fixed cable length option available right now, so cable lengths will update if something is moved. Best you can do for now is to position the assembly in the worst possible position so the cable will be at maximum length and use that.
I realise there is still a lot to do, but I have quite the backlog of requests to get through.Senior Director, Technical Services, EMEA1 -
Thanks for the quick response @NeilCooke and I appreciate your guidance on this matter! A few more questions:
- let's say I wanted to split the wire routing for a connector in half. After wire routing, however, we have a composite part - is there any easy way you recommend to visually split the wire?
- let's say I wanted the extend the cable length without violating bend radius conditions on the individual wires (as shown below). Ideally though we would want the cable to extend all the way to the connector and wires not branch out on one end. Is this possible?

1 -
@NeilCooke thanks for this mindblowing FS. Really awesome job.
I've not found a free electric CAD that fits my needs and that can export the CSV needed as input to the cable/wire FS (although I've been playing around with QElectroTech for a while now).
Anyway I currently document my cables using WireViz which uses a more structured (and possibly information-richer) input .yaml file (see the example folder in the WV GitHub repo).
I'm wondering:
- might the WireViz input file be a nice additional input format to add to this FS (the WV project seems to have a lot of traction according to the GitHub stats)
- would be easier to write a WireViz-CSV external translator?
Cheers,
Stefano
2 -
Changelog for release 1.170
- Checks that only a single Wire data feature can be added to a Part Studio.
- Checks for duplicate wire and cable names.
- Wire bend factor, measurement units and more can now be set in the Wire data feature without having to create variables.
- Cable minimum bend radius is now calculated using the cable outside diameter and the wireBendFactor. If wireBendFactor is not specified, it will use the largest bend radius specified for all the wires in the cable.
- Minimum bend radius is now calculated from the outside diameter rather than core diameter.
- Alphanumeric connector pin names are now sorted correctly.
- Added error checking for harness / cable / wire name lengths (should not exceed 256 characters).
- To improve performance, cables can now be simplified. A new option under Create cable > Strip > "cable only" will remove the individual wires from the display of the cable and route the cable to the center location of all the connector pins.
- Cable diameter can now be overridden.
- Bundle diameter can now be overridden.
- Bundle diameter of existing coverings can now be modified to control varying bundle thicknesses.
- Various bug fixes and performance improvements.
Senior Director, Technical Services, EMEA11 -
Changelog for release 1.171
⭐ Clip order and direction can now be controlled in the route feature.
⭐ Cables now have more control over how and where the insulation is stripped back.
⭐ Minimum bend radius is now displayed when editing a wire.
⭐ New feature icons.
⭐ Various bug fixes and performance improvements.
Senior Director, Technical Services, EMEA6 -
Hi...a newbie and was playing around to find out if one of these scripts will do a twisted pair of wires or does it have to be done with a sweep through a spline?1
-
How up to date are the training videos linked off the custom feature document PDF? Does one need to also watch all the videos in this thread as well?I haven't started using the wiring features yet, but I'm very interested in implementing it for my companies latest project. I want to be able to get others up to speed without conflicting or incomplete documentation.
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
1 -
Changelog for release 1.173
⭐ Clip order and direction are now more resilient to upstream changes. *
⭐ Wire and Reference IDs with spaces are now changed to underscores.
⭐ Various bug fixes and performance improvements.
* Thanks to customer feedback, there was a problem with the original definition of how I was calculating and storing the clip direction arrows, where upstream changes such as feature suppression was causing the arrows to get mixed up and produce the wrong result or just simply fail. This update is now more resilient to upstream changes, but a major overhaul of a lot of the underlying code was required and in the process I was able to optimise for better performance. If you intend to update existing wire routes that have manual clip order/directions in them, you may need to force each feature to regenerate so that it will use the new code or worst case, reselect your clips. The easiest way to do this is to open each feature and toggle off/on the "Show wires/cable" switch.Senior Director, Technical Services, EMEA3 -
Hi, thanks for a great feature!
I've been trying to make a 2d drawing containing cable and connector specs – but it is not possible to import the custom table that is generated, and I can't seem to pull the part names on terminals and connectors either.
Is there any way to do this? Or what is best practice for using this in documentation?
0 -
This is a WIP and hopefully available soon. There is no workaround, sorry.andreas_ranch146 said:Hi, thanks for a great feature!
I've been trying to make a 2d drawing containing cable and connector specs – but it is not possible to import the custom table that is generated, and I can't seem to pull the part names on terminals and connectors either.
Is there any way to do this? Or what is best practice for using this in documentation?Senior Director, Technical Services, EMEA1 -
Changelog for release 1.174
⭐ Added accurate wire packing and cable diameter calculations.
⭐ Bug fixes
Senior Director, Technical Services, EMEA16 -
Very nice update! Maybe it is possible to use this new algorithm to, in the future, define twisted cables?2
-
This is a beautiful feature, great job.
Another area I can see something similar to this being very useful is with hydraulic or pneumatic lines in machinery.
2 -
Great feature NeilCooke! We've been using a copy of the document made at Version 1.159 (I believe). Is there a to update our copied document to match the latest version 1.175 release? So far everything I have tried results in the features crashing in the part studio within the document, let alone in other documents. I know we probably should be running directly from the Public document to keep up to date, but our Engineering team wanted closer control on what was happening (as I understand it)NeilCooke said:Changelog for release 1.174
⭐ Added accurate wire packing and cable diameter calculations.
⭐ Bug fixes0 -
@Matt_NC there is nothing really that can be customised in the script that requires a local copy so you should always use the public one. Your only option is to have your copy and the public one open side-by-side and copy/paste the FS code from one to the other.
Senior Director, Technical Services, EMEA1 -
Ive noted alot of crashed cables too after certain updates which stopped me from update certain cables and its linked FS.
However, with new cables I always use the latest...
I still havent figured out what is the best approach with the CSV files and if there should be one for each cable or one master with all cables in them. Im almost leaning to it would be nice if I could define the variables in OnShape in every separate cable to have better control. Also, when routing cables in larger assemblies I import the latest assembly into my Cable routing assembly and then I use that to create different cables. This is however quite slow method since OnShape doesnt handle working in big assemblies in a good way.
It would be interesting to know how other people approach the routing of cables and what really is the best and fastest way..0 -
@NeilCooke , I thought that might be the case and did give it a go, but it kept failing. Probably losing some link between the different FS studios that I didn't spot. I'll definitely advocate for using the public script going forward.0
-
Changelog for release 1.176.0
⭐ Insert and reposition library clips *
⭐ Fixed an issue with configured connector parts.
⭐ Various clip-related routing fixes.
* One thing I forgot to mention in the video is to make sure that the X axis (the red one) of the mate connector on the library part is pointing in the same direction as the axis on the library part. I just noticed the clip in the video is defined wrong and orients at 90 degrees to the user selection
Senior Director, Technical Services, EMEA6 -
Changelog for release 1.176.1⭐ Added vertical offset option for inserted library clips
⭐ Added align to connector option for defining insulation length on a library connector part *⭐ Added a new workflow that allows only one wire per feature to be edited
⭐ Fixed an issue when using curves as clips
⭐ Fixed an issue where previously removed Wire refs could not be re-added⭐ Fixed an issue with connectors created in-context
⭐ Fixed an issue where "no more wires" causes previous wires in the same feature to fail
⭐ Fixed an issue where multiple wires through multiple clips was failing
⭐ Fixed an issue where reordering wires within a route feature caused manual wire edits to fail
⭐ Fixed a dubious error message caused by strip length set to zero in connector definition
⭐ Fixed an issue where multiple contiguous bundle routes are selected
* Ideally, connectors should be defined with a short length of insulation contained within the connector and the insulation length should be set to ensure that it terminates at the back of the connector, as this is the point where the wire is free to bend. It is also important if you are using "measure to connector" in the Wire data feature as the measurement taken is the entire length of the wire minus the strip length and insulation length.Senior Director, Technical Services, EMEA5 -
Neil, I can see you been busy on that FS, - very nice. I was just wondering if it could be used, as a sort of template for say - hydraulic tubing , or rubber hoses.Could that be coming in the future?0
-
If you structure your csv file right, you can do it right now. I was toying with the idea of adding a "type" column to distinguish between cables and tubes.rick_randall said:Neil, I can see you been busy on that FS, - very nice. I was just wondering if it could be used, as a sort of template for say - hydraulic tubing , or rubber hoses.Could that be coming in the future?Senior Director, Technical Services, EMEA6 -
Changelog for release 1.177
⭐ Fixed an issue with offsetting existing bundles
Senior Director, Technical Services, EMEA0







