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.
Generating a sketch that can be derived in other part studios
Cedric_Eveleigh
Member, OS Professional, csevp Posts: 64 PRO
I'm new to feature script. I'm trying to create a feature script that generates a sketch that can be derived in another part studio. So far, the feature script generates a sketch, but this sketch is not shown as an option when attempting to derive it in another part studio.
Standard sketches can be derived, so I looked into the standard sketch feature (sketch.fs in the std code), and I tried copying some stuff, but I couldn't get something working. I don't understand what's going in sketch.fs (with the startFeature, endFeature, return newSketchOnPlane, etc).
Any help is appreciated.
Standard sketches can be derived, so I looked into the standard sketch feature (sketch.fs in the std code), and I tried copying some stuff, but I couldn't get something working. I don't understand what's going in sketch.fs (with the startFeature, endFeature, return newSketchOnPlane, etc).
Any help is appreciated.
Tagged:
0
Comments
Still, it's quite annoying to have to put an empty sketch in every part studio and remember to select the entire part studio when deriving.
I need to derive a specific sketch (hopefully generated by a feature studio) from a part studio with a lot of content, so it's not an option to derive the whole part studio. Your suggestion is interesting but it doesn't solve my problem.
The only way I know of to achieve what you're trying to do is with the API.
The API can be used to create "real" sketches programmatically.
I've also been able to take a sketch from one part studio and recreate it in another using the API, but I'm not sure if that can be done with a sketch created via FS. It might be possible I just haven't tried it yet.