Message 1 of 12

Not applicable
10-29-2018
11:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all. below is a small lisp routine where i can pick text and it will add brackets and an X to the front and a bracket to the end. I would like to modify this so it will remove the last character of the text i pick before if adds the brackets and the X. Can anyone help me modify this?
(defun c:P4( / i s x )
(if (setq s (ssget "_:L" '((0 . "TEXT") (1 . "~(*)"))))
(repeat (setq i (sslength s))
(setq e (entget (ssname s (setq i (1- i))))
x (assoc 1 e)
)
(entmod (subst (cons 1 (strcat "(X" (cdr x) ")")) x e))
)
)
(princ)
)
Solved! Go to Solution.