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.
My Feature Script 'Spring Maker' stopped working
Otto_DeRuntz
Member Posts: 35 PRO
Not sure when this happened but all the springs, made using a feature script, we named 'Spring Maker V2.1', are failing. If I go back to any earlier release or version the springs generate fine. The error I get is 'Spring Maker V2.1 did not generate properly; Could not create a valid swept body, check input.'
Tagged:
0
Answers
Maybe go back to referencing an older version of the standard library?
Ramon Yip | glassboard.com
The script has always worked. It's been improved to add more needed functionality. Onshape did something to break it.
Link and we can help debug? 😃
The last version regenerated fine, so I restored it too main and it broke.
How do I link my file?
I believe this is it, My latest version is V2.1
https://cad.onshape.com/documents/f46edbce21e8fdfbd1376ace/v/f832e646bc4cc10a836ce4db/e/b25f3674c907262eac450d9f?showReturnToWorkspaceLink=true
Seems to be a private document, I can't access that link.
What I mean is this:
Try to change the number back a previous version of the standard library.
Ramon Yip | glassboard.com
The tool was updated and refined by a coop we had a year ago, I am now trying to understand the tool better myself.
My feature script was built using Feature script 2473. I don't have any earlier versions of feature script. What I don't understand is why the previous versions generate fine from the same script, 2473, but when I switch to the 'Main' version the part won't generate.
The error that I get is "Could not create a valid swept body, check input." . I don't know how to understand where the failing feature is in the script and how to debug or fix it.
How can I share my document so that others can see it?
I made my Spring Maker Tool Public, so I think anyone interested can open it.
SpringMaker | Current Spring Maker
@Otto_DeRuntz At least the broken instance in your shared doc is fixed by using opSweep the way you used to use opSweep: dont specify a
lockFaces. It's an optional parameter, so you dont have to, and Im not really sure what you are trying to achieve by including it. At line ~1206::opSweep(context, sweepId, { "profiles" : qSketchRegion(profileSketchId), "path" : qCreatedBy(helixId, EntityType.EDGE), //"lockFaces" : qSketchRegion(profileSketchId) });
That fixed it! Thanks
I did not write or update the script, so I still need to learn and understand better.
But a BIG Thank YOU
Ah - all good. A helpful place to start is the FeatureScript Notice area. When a feature breaks in a part studio, it usually reports where (in code) it broke, which is very important when troubleshooting custom features. Click the
{ ✔️ } in the upper right corner of the top row and you can look at a 'callstack' of the failure. That's how I found which particular operation (the opSweep) had failed. From there I just looked at the difference between the two versions.
One last thing: if youre just getting in to FS (welcome! the water is warm but unusually full of sharks!) check out theonsherpa.com
Evan will get you rolling for sure. And his videos are great (I was in one!)