Finding .dwg files containing a text string

I want to search a large directory structure for all ACAD .dwg files containing a particuar word in a note.

I've tried the Windows Search function assuming that drawing notes would be ASCII encoded, but apparently that was a bad assumption. (I'm running Win2K.)

Is there any way to do this?
GaryGarnierAsked:
Who is Participating?
 
Tommy KinardCommented:
Hi GaryGarnier

We could use VBA to open the drawings search for what you want to, put the file name and path in an array, write the array to a file after processing all of the dwgs in the directory. Or fix the problem (if it is a problem).

Or we could use a converter on the dwgs, change to dxf's and search the dxf's with windows search for text in documents options. Long way around IMHO.

dragontooth

0
 
gonzal13RetiredCommented:
Could you not use windows explorer search and use something like this?

*word*.*
0
 
GaryGarnierAuthor Commented:

I've tried (unsuccessfully) Explorer search as you suggest (putting the word I want in the "A word or phrase in the file" field) but without the stars. When I get to work Wednesday I'll try it with stars, but I don't expect a different result.

I renamed one ACAD file, gave it a .txt extension and opened it with Notepad. As I said in my question, it appears that even drawing notes are not ASCII-coded in a .dwg file. I think this will require a fairly sophisticated solution involving a knowledge of how AutoCAD encodes user-entered text within a file.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
gonzal13RetiredCommented:
The 'stars' are wild cards. It should work as long as you supply a key word in the method I mentioned above.
It should read *word*.dwg
Sincerely

Joe
0
 
GaryGarnierAuthor Commented:
I know about wild cards - but if you'll note in my original post, I'm searching for files that have a particular word within a note inside the file, NOT files having that word in the file name.

If the files of interest were Word .doc files, I could just Search for files named *.doc and put the target word in the "A word or phrase in the file" field. But apparently ACAD does not use ASCII encoding for user-entered text such as notes. That's why I think this requires a solution that exploits knowledge of how text is encoded in an ACAD file.
0
 
Corey ScheichDeveloperCommented:
I have used DragonTooth's method in the past.  You will have to recurse both the ACADText Objects and block attributes for the values.  I was able to find and replace TitleBlock text on thousands of drawings in a resonable amount of time.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.