I have a floor plan created in HTML Canvas element. I want to generate a .dwg file of the floor plan, so that it can be opened in CAD softwares. I'm not getting enough clue or tutorials on how to take the second step. For the first step, I've managed to get all possible data from HTML Canvas, such as dimensions of the objects, co-ordinates of every element in the 2d plane and so on. Any inputs/pointers would be really helpful. Thanks in advance!
I tried going through Autodesk Forge platform but there is no clear tutorial on how to go about my problem statement.
You need to get comfortable with AutoCAD ObjectARX API programming. Start small, like learning how to construct a simple rectangle using dimension data retrieved from your HTML canvas. Determine whether the data is in JSON or another format. You also need to build a mapping data structure to convert your data into a format that AutoCAD can understand.
Please note that the example provided is very superficial, and many details have been omitted. The purpose of the following example is to give you a fair idea of what you will be working on during the onboarding APS Design Automation which ultimately gives you DWG.
For example, you have Polyline on your HTML canvas, you have extracted the data in the form of JSON.
You need to serialize this in to a .NET Object like this,
Then, you need to use AutoCAD .NET SDK to build the polyline.
Once you get comfortable with building an AutoCAD plugin, next step would be understanding the APS Design Automation [FKA Forge].
NET Training
My First AutoCAD Plugin
Developer Documentation
APS Design Automation Tutorial