Hacking AutoCAD files
Hacking AutoCAD files
(OP)
What if I had a .dxf or .dwg file and I wanted to know if it referenced any other AutoCAD files without opening it in AutoCAD? Could I trudge through the data in the file and find out? Could I write a script that would do it?





RE: Hacking AutoCAD files
1. Open the dxf file (text file) for read.
Open WriteFile.txt for write
2. Read line loop to end of file
3. if l SomeText found in line (InStr) write the next line to WriteFile.txt
etc
With DWG file, it is not easy. OpenDWG sitges provide structure of a DWG binary file but I doubt if it is worth the effort.
Hope this is useful.