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.
Absolute beginner understanding of FeatureScript.
Hi everyone,
I'm a user of Onshape and I'm interested in learning FeatureScript. I've gone through most of the courses available, but I'm still struggling to understand the nuts and bolts of the language.
The courses I've taken generally assume that the learner has some prior knowledge of coding, but I don't have any. I'm looking for a course that will explain every comma, space, and function in FeatureScript in a way that I can understand.
I'm willing to put in the time and effort to learn, but I need a course that will give me a solid foundation in the language. Does anyone have any recommendations?
Thanks in advance for your help!
Comments
https://learn.onshape.com/courses/featurescript-fundamentals
This is also kind of fun:
https://learn.onshape.com/learn/article/teach-programming-with-onshape
If you don't have any prior knowledge of coding, before you dive into FeatureScript, it might be smart to start with a basic JavaScript course like this one:
https://www.codecademy.com/learn/introduction-to-javascript
@M_Arc when you get stuck, reach back out on the forums and we will help you out. Evan and Konstantin helped me out back when I first started. There are lots of willing FeatureScript devs around.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
@M_Arc yes, this is possible. I believe the feature set you are looking for will be Frames. The Cutlist feature can calculate all of the frame data such as length, frame profile, etc... You can copy the cutlist or frames feature then modify it to add part numbers to your frames.
Here is an example of how to copy and modify the Frame feature so that it generates a part number and part name based on profile and longest edge of the frame:
https://cad.onshape.com/documents/0470f1119a2d2fc1b2e6c761/w/6bb4d328e5af27a714045feb/e/f4cf48ae649f809b73b6...
After copying the Frame features code, I added the following to the doFrame() function. The added code will find the selected frame profile description, then search for the longest edge of each frame. Once it finds the longest edge of a frame, it sets the properties for that frame.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Wow, this is awesome! Thank you so much! This is going to help so much.
What I circled in red, is that the length? If so how do I get it in inches?
Looks like the DM was quicker and this was just now posted. I'll quote the DM answer for any future users to see:
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴