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.
Sheet metal flange using featurescript
Hi everyone! 😁
I'm working on creating a very basic flange on a square flat sheet metal part using FeatureScript. My goal is to eventually generate a 90° flange by selecting the edge of the sheet.
I managed to achieve it by copy-pasting the entire code from the official standard library, but I’d like to know how to simply call the function export const sheetMetalFlange = defineSheetMetalFeature(function(context is Context, id is Id, definition is map)
in my own project without having to duplicate all the code.
Any guidance on how to do this would be greatly appreciated! 😀"
Comments
You don't need to copy all the code, you can just import it:
import(path : "onshape/std/sheetMetalFlange.fs", version : "2506.0");
Custom FeatureScript and Onshape Integrated Applications
Thank you for your answer, Caden! 😊 I was aware of the
import
method and had tried it, but I still couldn’t manage to get my preconditions working properly.Eventually, I found that using
export import
when importing the code resolved the errors and fixed the issue!Thanks again for pointing me in the right direction! 👍