Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

How do I export a configured part studio via translations?

William_LorenceWilliam_Lorence Member Posts: 2

I have a configurable part studio. I want to be able to make changes to the configuration and export the configured part studio to different formats through the API, but I keep getting an error from the translations endpoint (https://cad.onshape.com/glassworks/explorer/#/PartStudio/createPartStudioTranslation) when I try to include my configuration string.

// POST body
{
    "configuration": "<my_configuration_string>",
    "formatName": "STEP" // would like to support a variety of formats
}
// Response body
{
    "moreInfoUrl": "",
    "message": "An illegal argument was provided, check your request.",
    "code": 0,
    "status": 400
}

If I take that exact same configuration string and provide it to the part-studio-to-gltf endpoint (https://cad.onshape.com/glassworks/explorer/#/PartStudio/exportPartStudioGltf), the output reflects the configuration as expected, so I am confident that the configuration string is not malformed. Is there something else that I need to provide to the translations endpoint? Does it not support configurations? The documentation about exporting configured parts is… underwhelming; it only shows a single example using the dedicated part-studio-to-parasolid endpoint, and the error message from the API doesn't give a whole lot of clues for what the problem is.

Answers

  • shawn_crockershawn_crocker Member, OS Professional Posts: 879 PRO

    If you open up your console in your browser while initiating an export, you can snoop into exactly how the onshape system structured its url, parameters and body. This doesn't work with all onshape actions as a lot of the calls are being made server side. In the case of the translations endpoint however, the call is being exposed to the console.

Sign In or Register to comment.