An NG member was kind enough to supply this code to me. It draws a line underneath text with inputted text location, linetype and linetype scale. ------------------------------------------------------------------------------------------------------------------------------------------------------ I would like it to use the current text style and height, instead of the standard style and prompting me for a height. I would like it to use hidden as the linetype, instead of being prompted. I would like it to retain the initially prompted input value for the linetype scale, until I change it. Finally, stay in the command until I force an exit. ________________________________________________________________________________________________________________ This is the code: (defun c:ntu (/ tx hei loc ss ssn sse sp th gap tb tb1 tlen ep elast ename opt ss2 ent sf opt1) (vl-load-com) (setq tx (getstring T "\nENTER NEW TEXT TO ADD UNDERLINE: ")) (setq st (getstring S "\nENTER TEXT STYLE: ')) (setq loc (getpoint "\nENTER LOCATION FOR OBJECT: ")) (command "_text" loc ST "" tx "") (setq ss (entlast)) (setq sse (entget ss)) (setq sp (cdr (assoc 10 sse))) (setq th (cdr (assoc 40 sse))) (setq gap (* th 0.2)) (setq tb (textbox sse)) (setq tb1 (nth 1 tb)) (setq tlen (car tb1)) (setq sp (list (car sp)(- (cadr sp) gap)(caddr sp))) (setq ep (list (+ (car sp) tlen)(cadr sp)(caddr sp))) (command "_line" sp ep "") (setq elast (entget (entlast)) ename (cdr (car elast)) opt (getstring "\nENTER NEW LINETYPE NAME: ")) (command "_change" ename "" "p" "lt" opt "") (setq ss2 (entlast)) (setq ent (vlax-ename->vla-object ss2)) (setq sf (rtos (vlax-get-property ent "LinetypeScale"))) (setq opt1 (getreal (strcat "\nENTER NEW LINE TYPE SCALE" "<" sf ">" ": "))) (vla-put-LinetypeScale ent opt1) (princ) ) A great thanks to Ade Suharna for supplying the code. Thanks for any help forthcoming!
Ah, so. The program had some errors as Rick had entered it and I started to fudge with it before the crash. Hmm. . . rs : TCEBob, : Hint: : : : http://discussion.autodesk.com/thread.jspa?threadID=382909 : : Bob