Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Underline mtext

2 REPLIES 2
Reply
Message 1 of 3
cadman009
782 Views, 2 Replies

Underline mtext

Hey, y'all, Anybody have a routine for underlining multiple instances of mtext? I'm sure it would be a simple routine, but I haven't been into LISP programming for awhile, and I'm having trouble getting my head back into it.
2 REPLIES 2
Message 2 of 3
EC-CAD
in reply to: cadman009

Here's an old one I had...



(defun C:UMT ( / ss a b c val new_val ); UnderLine Mtext

(prompt "\nPick MTEXT to Underline: ")

(setq ss (ssget))

(if ss

(progn

(setq c 0)

(repeat (sslength ss)

(setq a (ssname ss c))

(setq b (entget a))

(if (= (cdr (assoc 0 b)) "MTEXT")

(progn

(setq val (cdr (assoc 1 b))); value

(setq new_val (strcat "{\\L" val))

(entmod (subst (cons 1 new_val)(assoc 1 b) b))

(entupd a)

);progn

);if

(setq c (+ c 1))

);repeat

);progn

);if

(princ)

); function



Bob
Message 3 of 3
cadman009
in reply to: cadman009

Thanks! I'll give it a try.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost