Search code examples
autocadcadcommand-line-tool

command line program to list layers in a DXF/DWG file


I have a CAD file and I'd like to do some scripting with it and was hoping for a little software program that could just give me a list of the layers. I tried (on mac and windows) to get CAD::Drawing from cpan working (perl) to no avail.

Could somebody point me to either a library (more or less any language is fine) or a software program that will allow me to accomplish this. Platform doesn't matter I have access to Linux mac and pc.

Thanks


Solution

  • For standalone applications, the two most common DWG libraries are Teigha and RealDWG. DXF files are text files that can be parsed fairly easily without any special libraries.