Again here:
I noticed you skipped 29 to 38? why is that? and if it should be included what is the new string then?
EDIT:
[code](defun c:ghj (/ enx idx sel str f n _Str)(if (setq sel (ssget "_X" '((0 . "TEXT,MTEXT") (1 . "*VERTICAL BEND[color="blue"],*HORIZONTAL BEND")))) (repeat (setq idx (sslength sel)) (setq enx (entget (ssname sel (setq idx (1- idx)))) str (assoc 1 enx) _str (Cdr str)) (setq f nil n [color="blue"] 51) [color="blue"] (if (wcmatch _str "*HORIZONTAL BEND") (entmod (append enx (list (cons 8 "Defpoints")))) (progn (while (and (not f) (> n -1)) (setq f (vl-some '(lambda (k) (if (wcmatch _str (strcat k "*VERTICAL BEND")) (atoi k))) (list (itoa n) (if (zerop n) "-0" (itoa (- n)))))) (setq n (1- n)) ) (if (and f (setq nstr (cond ((or ( |