12

I want to show AutoCAD-files (.DWG) in my AngularJS application and I'm using a Node.js backend for my application.

Are there any DWG libraries in Javascript? Are there any DWG Node libraries to convert DWG files to a SVG / PDF / ...

I don't want to edit them; just show them online in my application.

The only that i could find was this : http://etc.nkadesign.com/Download/Cad2svg

It's a linux command-line utility but I cannot use it since I want to host my application on the Heroku platform.

tdhulster
  • 1,531
  • 3
  • 18
  • 32

3 Answers3

3

Check out the autocad the 2014 JavaScript API http://adndevblog.typepad.com/autocad/2013/04/getting-started-with-javascript-api-on-autocad-2014.html

Here is a YouTube video

http://m.youtube.com/watch?v=PZKKJwcke2k&desktop_uri=%2Fwatch%3Fv%3DPZKKJwcke2k

Trae Moore
  • 1,759
  • 3
  • 17
  • 32
  • 3
    How exactly using JS extensibility model for AutoCad helps you create Node-js application that can manipulate read DWG files? You cannot install AutoCad on Heroku either so IMO this is not an answer of the question in hand. – Miroslav Nedyalkov Jan 27 '15 at 22:42
  • @MiroslavNedyalkov, feel free to give a more concise answer. I don't work in the JS API for AutoCAD, nor do I work on Heroku. This was merely a starting point suggestion for the OP. Your comment is pointless and serves no productive purpose. Have a good day :) – Trae Moore Jan 29 '15 at 19:02
  • 2
    Unfortunately after researching the topic I figured out that there isn't very good solution. The best I found was abandoned C library called LibDWG (http://libdwg.sourceforge.net/en/). To summarize: I wish I had better answer of this question :) Have a nice day, too! – Miroslav Nedyalkov Feb 01 '15 at 20:48
  • There is a tiegha file converter made by the Open Design Alliance. It is a CLI exe that can convert dwg to dxf. https://www.opendesign.com/guestfiles/teigha_file_converter .Then there are lots of dxf parsers. I like this one https://github.com/gdsestimating/dxf-parser – LrakWortep Feb 05 '18 at 14:50
2

There is a tiegha file converter made by the Open Design Alliance. It is a CLI exe that can convert dwg to dxf. opendesign.com/guestfiles/teigha_file_converter .Then there are lots of dxf parsers. I like this one github.com/gdsestimating/dxf-parser

LrakWortep
  • 217
  • 1
  • 4
  • 15
0

There is a NodeJS wrapper library for the Vector Express conversion API you may be able to use: https://github.com/smidyo/vectorexpress-nodejs