Tool to extract text from dwg file
Tool to extract text from dwg file
(OP)
Hi all,
we are searching for the batch tool (preferably for linux) which can process dwg and other cad formats, and extract text which is required for indexing.
So what we need ideally is command line tool where input is dwg file, and output is text file which contains all text which is in dwg file (in layers, metadata...)
Anyone knows any such tool on the market?
Thanks in advance,
Jelena
we are searching for the batch tool (preferably for linux) which can process dwg and other cad formats, and extract text which is required for indexing.
So what we need ideally is command line tool where input is dwg file, and output is text file which contains all text which is in dwg file (in layers, metadata...)
Anyone knows any such tool on the market?
Thanks in advance,
Jelena





RE: Tool to extract text from dwg file
I remember that I found long time ago on Internet a lisp routine which extract the text from a dwg file in a txt file but in a selected area made before by the user (its not a batch tool and it was for Windows).
If you are interested I can try to find it in my old files.
Regards
Fernando
RE: Tool to extract text from dwg file
I see you are still looking for your tool, unfortuneatly I don't know of any that will do quite what you want. However, if you have script pro, you can get close to what you need. The only part you'll need to do is write the LISP/VBA/VB (or C, or ARX) routine to extract the text you want for each drawing.
HTH
Todd
RE: Tool to extract text from dwg file
yes we are still looking for the tool and didn't really come any closer... Issue is that we don't know too much about cad and dwg format, as we are all java developers, but have customer dwg files to index.
Is it possible that we are the only one having that issue to index dwg files for full text search :)
Thank you in advance!
Jelena
RE: Tool to extract text from dwg file
Nope, you're not alone in this one, I'm just not sure if anyone has tackled it using java. This isn't a terribly complex thing to achieve, it's just a little involved.
I don't know anything about java (I'm a VBer), but I wrote a FAQ you can find here http://www.tek-tips.com/faqs.cfm?fid=5800. This deals more with extracting attributes than it does text, but it may give you some insight to the DWG format/object that you can adapt to java.
Let me know if you need any help, I've done a lot of batch processing - just never with java.
HTH
Todd
RE: Tool to extract text from dwg file
I don't know if this will help. In the future, as part your company's standard, You could require that all text be put in attibrute format. This will allow you to draw off text, as a option, into various file formats. For example, copy text into Microsoft Excel.
Hope this helps,
John
RE: Tool to extract text from dwg file
as we are providing document management system, we can not control or require any specific type of text or attributes in dwg files. We only get whatever our customers upload and need to index text out of it, so that it is available through search. At the moment we are evaluating DWGDirect from opendesign.com - anyone had any experience with it...
Thanks for all replies!
Jelena
RE: Tool to extract text from dwg file
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: Tool to extract text from dwg file
I have worked with DWGDirect from opendesign.com and it does work although not without some quirks, but it should do what you are asking, and it is nice from the standpoint you don't need to open each drawing. In the past when I had to do batch importing, we had a full blown version of AutoCAD sitting on a machine all by itself and a routine that would query a database on the server every 15 seconds looking for work to do, when it found it, it would then run all the drawing through this version of AutoCAD on this lone station parsing it for information to import, with the DWGDirect ocx, you could almost ditch the extra version of AutoCAD (we did other batch processes that DWGDirect wouldn't do at that time), even though the process was fairly fast anyway, you didn't have to worry about AutoCAD hanging up.
HTH
Todd
RE: Tool to extract text from dwg file
thanks for answer.
Yes, that's excatly what we are trying to avoid - having AutoCAD installed on production machines, that's why DWGDirect sounds more reasonable.
You mentioned AutoCAD hanging from time to time, what is your experience with DWGDirect, how fast it is, does it hang, how reliable it is actually?
One more question is that our requirement is to get text within layers - is DWGDirect capable of extracting _all_ text from dwg files?
Cheers,
Jelena
RE: Tool to extract text from dwg file
When I used DWGDirect, it was very fast especially since you don't have the overhead of AutoCAD, and that in itself was a huge performance gain, (now when I write automation for AutoCAD - I actually use an API so I can wait indefinitely for AutoCAD to finish loading so my code doesn't go right by it!), it's just about the same as any small app you normally use - occasionally when a drawing file is large, it will slow it down but not that much.
When I used it, I used it for extracting title block attributes, but yes it can parse for any entity within a drawing - the exception may be dictionary entries - which don't apply to you. In the past, occasionally with the OCX, the routine seemed to run but nothing actually happened, to this day I still don't know why (could have easily been my code) but I found it's failure rate was around 30-40%, but, if we ran it though again, it would work - didn't seem to have any rhyme or reason, but that was about 5-6 years ago. I'm sure they've made significant improvements since then.
HTH
Todd