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.
Translating drawing through API
shawn_crocker
Member, OS Professional Posts: 866 PRO
I am wondering if there is a way to have a translation post request for a drawing only return results when the translation status is "DONE"? For now, it seems I need to call the translation, and then I call the status of the translation and keep calling it in a loop until the status is "DONE". Then I use the id from that status call to call out a stream of the file. This would be a lot simpler if the initial translation call waited to return results until the translation was "DONE".
0
Best Answer
-
caden_armstrong2 Member, User Group Leader Posts: 127 ✭✭✭Because the translation endpoint is a bit of a catch all, there are scenarios where that wouldn't work.
Sure a drawing is pretty quick to translate, but the same endpoint can be used to export a 1,000 part assembly in fine detail. A process like that would exceed the request timeout before finishing.
It probably isn't what you want, but there is a way to register a webhook to receive a notification when a translation is complete.
https://onshape-public.github.io/docs/translation/#webhook-translation-completion-notification
0
Answers
Sure a drawing is pretty quick to translate, but the same endpoint can be used to export a 1,000 part assembly in fine detail. A process like that would exceed the request timeout before finishing.
It probably isn't what you want, but there is a way to register a webhook to receive a notification when a translation is complete.
https://onshape-public.github.io/docs/translation/#webhook-translation-completion-notification