get texts in parentheses.

get texts in parentheses.

nychoe1
Advocate Advocate
469 Views
2 Replies
Message 1 of 3

get texts in parentheses.

nychoe1
Advocate
Advocate

hello everyone.

I want to get texts in parentheses.

first, select all texts and change texts.  there are many texts list... some help.

 

for example...

->

 

thank you all.

0 Likes
470 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant

Try....

 

(vl-load-com)
(defun c:TextInsidePar ( / ss i ed tx st en)
  (if (setq ss (ssget '((0 . "*TEXT"))))
    (repeat (setq i (sslength ss))
      (if (and (setq ed (entget (ssname ss (setq i (1- i)))))
	       (setq tx (cdr (assoc 1 ed)))
	       (setq st (vl-string-search "(" tx))
	       (setq en (vl-string-search ")" tx))
	       )
	(entmod (subst (cons 1 (substr tx (+ st 2) (- en st 1)))
		       (assoc 1 ed)
		       ed)))))
  (princ)
)
Message 3 of 3

nychoe1
Advocate
Advocate

thank you BeekeeCZ .. for your help.

0 Likes