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.
Add Featurescript API Not Working as Expected?
kyle_tennison683
Member Posts: 2 ✭
Hello!
I'm trying to add a custom feature into a partstudio. There is documentation for doing this in the onshape documentation (link here), but the server always returns with some sort of error.
If you try to run the example that they include in the glassworks viewer, you'll see:
I get the same issue when I try to do any other feature add. It looks like the request schema changed, and I'm not sure if there is updated documentation to go along with it. I'm wondering if anyone knows how to run this example and/or if there is any documentation/other example that works.
I'm trying to add a custom feature into a partstudio. There is documentation for doing this in the onshape documentation (link here), but the server always returns with some sort of error.
If you try to run the example that they include in the glassworks viewer, you'll see:
{ "message": "Feature has invalid type", "moreInfoUrl": "", "status": 400, "code": 9999 }
I get the same issue when I try to do any other feature add. It looks like the request schema changed, and I'm not sure if there is updated documentation to go along with it. I'm wondering if anyone knows how to run this example and/or if there is any documentation/other example that works.
0
Answers
Can you post a sample of your request body? Its likely the issue with your feature object.
If you want a sample of what the feature object should look like, what you can do is manually add the feature to a part studio, and then use the /get features endpoint to see what it should look like. The feature object in the /get is the same as what you push into Onshape.
Since you haven't provided detailed error information or more context, it can be inferred that the issue may be due to invalid parameters or incorrect API calls for specific functions. You may need to further examine your code and refer to Onshape's updated documentation or seek help to resolve the problem.