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.
Best source for Examples?
dave_cowden
Member, Developers Posts: 475 ✭✭✭
Hi, everyone: again my apologies in advance if this is a dumb question.
I've been reading the documentation, and there are an awful lot of TODO's still in there. It is not complete enough for me to really understand FS well enough.
The best strategy, then, is probably to read lots of examples. Where can i find the best collection of working examples? I read a couple that were pinned to this group-- but where are some others?
I've been reading the documentation, and there are an awful lot of TODO's still in there. It is not complete enough for me to really understand FS well enough.
The best strategy, then, is probably to read lots of examples. Where can i find the best collection of working examples? I read a couple that were pinned to this group-- but where are some others?
0
Best Answer
-
kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565It's mentioned in other places, but just to be explicit here:
Our standard library contains lots of examples of FeatureScript functions being used, including all Onshape's native features. This code was written by humans, so it's likely going to be a better source for how to use FeatureScript than looking at the generated code in a Part Studio.
The full source code of the standard library is available here:
https://cad.onshape.com/documents/12312312345abcabcabcdeff
Hit the search button in the top right to search through every module of the standard library.
6
Answers
Its not really great code, because most of the variable names are auto-generated, but you can get some insights about functions available. As an example, though FSDoc does not ( currently ) document the map values allowed for the extrude function, if you just create a simple cylinder via extrusion in part studio, you can see all of the options created there.
Our standard library contains lots of examples of FeatureScript functions being used, including all Onshape's native features. This code was written by humans, so it's likely going to be a better source for how to use FeatureScript than looking at the generated code in a Part Studio.
The full source code of the standard library is available here:
https://cad.onshape.com/documents/12312312345abcabcabcdeff
Hit the search button in the top right to search through every module of the standard library.