Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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

12467

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    @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, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    edited May 2023
    @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, EMEAI
  • Seymur_DadashovSeymur_Dadashov Member Posts: 4 ✭✭
    @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.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Try magenta 😅
    Senior Director, Technical Services, EMEAI
  • ArnarArnar Member Posts: 4 EDU
    edited June 2023
    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. 


  • KritikaKritika Member Posts: 3 PRO
    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?)
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    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, EMEAI
  • KritikaKritika Member Posts: 3 PRO
    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?

  • stefano_cottafavistefano_cottafavi Member Posts: 2
    @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
  • goran_bgoran_b Member Posts: 2
    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?
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    goran_b said:
    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?
    No twisted pairs here yet.
    Senior Director, Technical Services, EMEAI
  • S1monS1mon Member Posts: 3,039 PRO
    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. 

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    @S1mon they are the same videos. Not had time to update them so you would have to watch the update videos as well. 
    Senior Director, Technical Services, EMEAI
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714

    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, EMEAI
  • andreas_ranch146andreas_ranch146 Member Posts: 3 PRO
    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?

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    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?

    This is a WIP and hopefully available soon. There is no workaround, sorry.
    Senior Director, Technical Services, EMEAI
  • Kristoffer_NilssonKristoffer_Nilsson Member Posts: 6
    Very nice update! Maybe it is possible to use this new algorithm to, in the future, define twisted cables?
  • kevin_wilkinsonkevin_wilkinson Member Posts: 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.  
  • Matt_NCMatt_NC Member Posts: 6 PRO
    NeilCooke said:

    Changelog for release 1.174

    ⭐ Added accurate wire packing and cable diameter calculations.
    ⭐ Bug fixes

    https://onshape.wistia.com/medias/faw0w51gax?embedType=async&seo=true&videoFoam=true&videoWidth=1280



    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)
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    @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, EMEAI
  • Kristoffer_NilssonKristoffer_Nilsson Member Posts: 6
    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..
  • Matt_NCMatt_NC Member Posts: 6 PRO
    @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.
  • rick_randallrick_randall Member Posts: 331 ✭✭✭
    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?
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Changelog for release 1.177

    ⭐ Fixed an issue with offsetting existing bundles
    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.