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.
Solutions for Batch Exporting
Kyle_Dupree
Member Posts: 3 PRO
Hi all,
I'm trying to find a method for batch exporting drawings into PDFs and sheet metal parts into DXFs from OnShape, when you have large released assemblies with parts and drawings in multiple documents, and potentially multiple configurations. Whether this be a 3rd party program, OnShape app, or something native.
Currently I have to create a large release package and export the PDFs one-by-one from that release package, Onshape did recently add a feature to batch export drawings from the tab manager; however, when you do that it cannot use your naming scheme correctly. I have to choose whether to rename 100+ PDFs by hand in File Explorer (and potentially make a mistake) or export them one by one from the release package.
It's the same issue with DXFs except these have to be done at the part studio level grabbing the sheet metal model.
It's just an exceedingly manual process that takes hours and it allows for a lot of mistakes to be made during the process.
I'm wondering what everyone else uses as a solution to this, if there's a 3rd party program or software that people have found success with or just a different method.
I'm trying to find a method for batch exporting drawings into PDFs and sheet metal parts into DXFs from OnShape, when you have large released assemblies with parts and drawings in multiple documents, and potentially multiple configurations. Whether this be a 3rd party program, OnShape app, or something native.
Currently I have to create a large release package and export the PDFs one-by-one from that release package, Onshape did recently add a feature to batch export drawings from the tab manager; however, when you do that it cannot use your naming scheme correctly. I have to choose whether to rename 100+ PDFs by hand in File Explorer (and potentially make a mistake) or export them one by one from the release package.
It's the same issue with DXFs except these have to be done at the part studio level grabbing the sheet metal model.
It's just an exceedingly manual process that takes hours and it allows for a lot of mistakes to be made during the process.
I'm wondering what everyone else uses as a solution to this, if there's a 3rd party program or software that people have found success with or just a different method.
Tagged:
2
Answers
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
We talked about this back in January, and at the time exporting a sheet metal DXF via the Onshape API wasn't supported.
But I just tested it again, and it looks like it is now supported!
I'll send you another email to follow up.
For any future readers, it can be done via the endpoint:
https://cad.onshape.com/glassworks/explorer/#/Document/export2Json
chadstoltzfus@premiercb.com
Can you please provide the API
how you can download the PDF of drawings.
If you are wanting to do this with the API, you'll want to use the translations endpoint. With this, you can create a drawing translation inside of the document the drawing resides in. Make sure you set the formatName in the request body to "PDF."
From there, you'll want to use the blobElements endpoint. This will give you a JSON response with PDF. You may need to use some encoding depending on what type of application you are calling this endpoint with.
Here are some more examples of translation provided by Onshape.
chadstoltzfus@premiercb.com
I also posted a tool recently to directly pull DXF geometry out of STEP assemblies. Maybe it would be good to write a version that directly exports plates given an onshape document url? https://github.com/jaschawilcox/step2dxf