As a first programming experience I gave myself the task to write a routine that checks every string in a drawing and deletes the empty ones. This is done by converting a string into a list containing just characters. Looping trough all characters in this list it checks if a character has a lower integer value then 33, if so it is an empty space. This seems to work fine for "DTEXT" but with "MTEXT" it seems a different problem, because these contain format characters like \P. Does anyone have a suggestion how to handle "MTEXT" in this case? As it is my first routine any comments on my approach (to finding all empty strings in a drawing) are more than welcome! Thanks in advance, Patrick
Patrick, I might be wrong about this, but I suspect trying to distinguish formatting characters from mtext body text may prove a daunting task. Take a look at Steve Doman's StripMtext program at http://www.users.qwest.net/~sdoman/ You might consider running Steve's program first. Then look for empty mtext objects. Or you could incorporate Steve's code into your program. But that may be over your head given, "first programming experience". Another program which might be of interest: John Uhden's KILLDOTS at http://www.cadlantic.com/Freebies.htm It deals with empty text objects, but not with mtext objects. Joe Burke checks every string in a drawing and deletes the empty ones. This is done by converting a string into a list containing just characters. Looping trough all characters in this list it checks if a character has a lower integer value then 33, if so it is an empty space. This seems to work fine for "DTEXT" but with "MTEXT" it seems a different problem, because these contain format characters like \P. Does anyone have a suggestion how to handle "MTEXT" in this case? As it is my first routine any comments on my approach (to finding all empty strings in a drawing) are more than welcome!