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.
future script help - beginner
I tried to import the code and I got errors. I watched some tutorials on how to use it but I didn't manage to make it work.
how should I paste it correctly?
here is the code:
Comments
-
ChatGPT is not capable of creating a working featurescript. It only produces garbage.
You'll have to learn how to write FeatureScript yourself. But Onshape has some great learning material to get you started:
https://learn.onshape.com/courses/featurescript-fundamentals
www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications3 -
As Caden said, ChatGPT is not capable of writing code properly and the OS Learning Center may help you out pretty good. As some kind of additional help: I made a Udemy course in JavaScript (you may also do TypeScript) to really learn the basics of codeing. Otherwise you will have a hard time understanding how FS really works.
0 -
Haven't tried it yet because it requires a subscription I believe, but C2I made a gpt app for FeatureScript. Not sure how well it works:
https://forum.onshape.com/discussion/22785/introducing-gpt-c2i-featurescript-helper-for-chatgpt-testers-wanted..Definitely complete the course Caden mentioned: FeatureScript Fundamentals
I've also been working on another FeatureScript course that has a different teaching style. It teaches on the fly so it may be easier to follow depending on your learning style: CADSharp FeatureScript Video Lessons
▚▞▚▞▚▞▚▞▚0 -
I've had fairly good luck with GPT to help me get something 90% of the way there, but of course the last 10% can be tricky. You can look at the standard library documentation but for non-programmers like me, it's very difficult to get a grasp on what it's telling you, and what it's leaving out.
You can also use the many examples from the standard feature doc:
https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/81869edac6224be29410b2a3Or use other people's featurescripts as a starting point and slowly modify them to do what you want.
after that, I recommend re-writing the whole working script from scratch (using the existing script to learn from) so you can try to understand what each line is doing.0 -
I created a custom GPT through ChatGPT and fed in the entire standard features in text form and the API. It was a large improvement but still resulted in what everyone is saying, 90% of it is good, 10% isn't and you need 100% for the featurescript to run correctly.
Philosophically, ChatGPT is not a replacement for learning a programming language.1 -
not a replacement, but 90% of the time, it's the patient, instantaneous teacher that I need.
1



