Text is Null
Is there any property or telltale way to know if you ahve null text in your drawing?The only thing I can think of is if the contents contain a space only, as in " "Any other ideas of how to find stupidity running rampant in the office? (ssget "x" '((0 . "TEXT")(1 . ""))
(ssget "x" '((0 . "TEXT")(1 . " "))
(ssget "x" '((0 . "TEXT")(1 . "")) 'to infinity and beyond
or you could turn on qtext and regen ... "null" text should show up as points in the drawing maybe something along the lines of:
if len(Trim(objtext.textstring))=0 then
' fight for whirled peas
end if Thank you to all three!!! I used a combined versioin of what you guys posted and it works great If any of you have done database programming, you might remember there is a difference between an empty string ("") and a NULL one.
And I believe any other string that contains 1-to-many space characters (Chr(32)) isnt Null, or an empty string.
One of the ways to check for Nulls is to read the variables in as variants, and check for IsNull. And then, if it is, add an empty string to it ("") to convert to string.
Whilst that would be true for an RDBMS, which AutoCAD is NOT, a simpler idea might be to use regular expressions...
页:
[1]