• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Distinguished Contributor
    Posts: 336
    Registered: ‎12-17-2003

    Underline mtext

    140 Views, 2 Replies
    11-26-2008 08:18 AM
    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.
    Please use plain text.
    Distinguished Contributor
    Posts: 5,929
    Registered: ‎12-12-2003

    Re: Underline mtext

    11-26-2008 11:16 AM 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
    Please use plain text.
    Distinguished Contributor
    Posts: 336
    Registered: ‎12-17-2003

    Re: Underline mtext

    12-01-2008 02:15 PM in reply to: cadman009
    Thanks! I'll give it a try.
    Please use plain text.