Visual LISP, AutoLISP and General Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Underline mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.
Re: Underline mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
(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
Re: Underline mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-01-2008 02:15 PM in reply to:
cadman009
Thanks! I'll give it a try.
