A question more, if I want have all text with prefix TB- , VA-, TELE I was thinking it would goes like this, but I doesn´t.
(defun c:test ()
(if (setq ss (ssget "_X" '((8 . "H_N*") (0 . "TEXT") (-4 . "<NOT") (-4 . "*") (420 . 0) (-4 . "NOT>"))) i -1)
(repeat (sslength ss)
(setq ent (ssname ss (setq i (1+ i))))
(if (tfind (setq y (substr (cdr (assoc 1 (entget ent))) 1 3)))
(princ (strcat "\nValue " y " is [" (rtos z 2 0) "] in Drawing " ))
)
)
)
(princ)
)
(defun tfind (y / sel )
(if
(setq sel
(ssget "X"
(list '(0 . "TEXT")
(cons 1
(apply 'strcat
(mapcar '(lambda ( x ) (strcat "[" (chr x) (strcase (chr x) t) "]"))
(vl-string->list (strcase y))
)
)
)
)
)
)
(princ (setq z (sslength sel)))
(princ "\nText not found.")
)
(princ)
)