Extraction of text from CAD files (DWG, DXF)
Sometimes we need to count translatable units in source files for proper invoicing.
For majority of text file formats this could be done in your favorite CAT tool. And not so easy when we deal with CAD formats, such as DWG and DXF.
Of course, you can open it in any CAD editor and just copy-paste all stuff in text file (ouch!). And now imagine situation when you deal with 156 blueprints. Hardcore.
We will go different way. Without any CAD software.
Step 1 You should figure out — what format you have. If you have DXF files, go to Step 3
Step 2 You have DWG files, for text extraction you need to convert DWG to DXF. For batch processing of bunch of files you can use EasyCAD (Windows, shareware, free trial up to 15 days) or Any DWG DXF Converter (Windows, shareware, free trial for 15 launches, 3 files at time). For processing of individual files you can use some of free CAD editors: DraftSight (Linux, Windows, Mac), nanoCAD (Windows) or whatever else could deal with DWG. Than just «Save as...» DXF.
Step 3 So you have bunch of DXF files now. Gather them in some empty temporary folder. Now it is time to magic. Grab super-useful utility DXF2TEXT. Unzip it and place to the same directory as DXF files. Fire up command line there and type:
for %i in (*.dxf) DO (dxf2text.exe %~ni)
This command will cycle through all DXF and extract all text info from them to separate text files.
Step 4 Now you have all that you need to count TU in your CAT tool. Success!