1

I'm working on a javascript application that uses the MarkupsCore extension to create markups on a floor plan in the Autodesk Forge Viewer. I want to export a .dwg file from the viewer, but I also want the file to contain those markups. I basically know how to export the .dwg file, but I don't know how to combine the svg markups with the file before exporting. Is this even possible? If so, how?

  • I'm not sure if you can save the markups data directly into the .dwg file (Maybe as metadata?). However you could export the markups data separately with the .dwg. Or if you want to keep it to 1 file only. Maybe appending the markups data after the binary data of the dwg file would work (however, this would not be a valid .dwg file anymore, you should choose a different extension). Then when you import it, you should retrieve that data from the file. These are just some suggestions... good luck! – melledijkstra Apr 27 '18 at 18:35

1 Answers1

0

The markups as stored/saved as SVG files, which is a XML-based format to describe geometry. And I believe you know that :-) I did a quick search and found a few articles about SVG to DXF conversion, where DXF can be imported and converted into DWG via AutoCAD engine (or Design Automation API).

So a route would be: show DWG model, add markups, save as SVG, convert to DXF, convert again to DWG, merge into original DWG. I don't have such a sample nor can guarantee it will work and be accurate, sorry.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44