autodesk or any other api to convert dwg to json - json

I would like to know if there is an API to convert Dwg to Json so that I can process in web application, not for rendering the CAD file.

Here's a code sample with a plugin to extract data to JSON from drawings - that's part of a demo for the Forge Design Automation API (that's cloud base service/API for automation here though so not sure if this API itself fits the bill for you) but you can just use the plugins on your local installation alone if you want.

How about DXF? It is text, it is documented.

Related

Forge viewer - Download pdf derivative via API

Can I download a pdf from a derivative via API?
It's not clear to me what exactly you're asking for. Below are a couple of answers to what I think your question could be:
You have uploaded a PDF file to the Model Derivative service, and you would like to download the results of the conversion?
While you can download the derivatives of 3D models, I'm afraid it is not possible for PDFs. When processing PDFs, the Model Derivative service converts them to image pyramids to enable Google Maps-like experience where zooming in on different parts of the PDF will load in higher resolution images of the area.
However, if your goal is to be able to load a PDF into the viewer without the Model Derivative service, note that this is also possible: https://aps.autodesk.com/blog/dwf-and-pdf-support-forge-viewer
You have uploaded a design (e.g., a Revit design) to the Model Derivative service, and you would like to download the PDF output that the service generated?
If you're interested in converting Revit designs to PDFs, I would suggest that you generate the PDFs using the Design Automation for Revit as this service is better suited for these types of tasks.

Autodisk forge files

I was wondering, the dwg files are hosted on my server, to use the viewer API do I need to upload it to forge platform then I can use the viewer API?
if yes is there API or otherways to upload the files to the platform I do not want to do it manually
if no this means it's ok I can use the viewer on the files on my server
Regards
In order to show any model (other than PDF) in the Viewer, you need to get it translated to SVF, which is the Viewer's format. This translation can only be done on our servers, so the file needs to be there at least while the translation is running.
https://forge.autodesk.com/blog/showing-files-viewer
We have a nice tutorial on how this can be done: https://learnforge.autodesk.io/#/tutorials/viewmodels

Autocad custom attributes translate to svf and read by Forge viewer

the customer data can be either of dwg file level or object level(such as XRecord), is it possible that Viewer reads it like reading metadata from Revit? Thanks.
You can extract custom data using the approach described in this sample. As of now, the sample runs on Design Automation v2, we're migrating it to v3.

How to use autodesk viewer api to view .dxf files on my website?

I have around 200 .dxf files on my server. I would like to integrate the autodesk-forge viewer so that people coming to my website can view the drawings? I do not see any example as such online which can help me in that? Do you guys have any examples which can assist me in this?
I do not want to upload the files on the cloud and use the embed link rather I just want to use the viewer api and pass my .dxf files from my server to view those on my website.
Any help will be highly appreciated?
I am afraid this is not possible, the Autodesk Forge Viewer requires you to upload the file on the Autodesk storage and use the Model Derivative API to prepare your DXF files to be viewed in the Viewer. You do not need to keep the DXF on the Autodesk storage after the process, but this is a required step.
If you follow this tutorial, you will be able to see you DXF files onlines. All resources are protected, but if you want to delete the seed file (aka the DXF file), you need to call this endpoint at the end of the tutorial steps.

autodesk forge: How to download bubble in zip format from using java sdk

I am using java SDK from autodesk forge
I am able to upload the .rvt file to the bucket.
What I am looking for is to download the converted bubble in .zip format (using java SKD).
Thanks.
The SDK itself, and the Forge API does not have an endpoint to do this. You need to parse the manifest, and download each item individually. An example written in Node.js is provided here: https://github.com/cyrillef/extract.autodesk.io, and the live demo here: https://extract.autodesk.io/. In future the endpoint might be added, but I do not know when it might be.