PDA

View Full Version : Mleader Lisp File


g_wong
2008-07-30, 01:23 AM
I have this Mleader lisp file that I need help with. I want the leader to underline the top text but i cant seem to find the system variable or command to do this?


(defun C:crd ()
(setq pntlist (getpoint "\n Pick Point: "))
(setq px (rtos (car pntlist))
py (rtos(cadr pntlist))

)
(setq coordstr (strcat "N " py "\nE " px))
(Setq P2 (Getpoint pntlist "Pick Leader End:"))
(If(<=(Car P2)(Car pntlist))
(Setq B(* -0.1 (getvar "dimscale")))
(Setq B (* 0.1 (getvar "dimscale")))
)
(Setq P3 (List (+ (Car P2) B) (Cadr P2)))
(Command "mleader" pntlist p3 "y" coordstr "")
(princ)
)

Thanks,

Moderator Note:
Please use [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code)

RobertB
2008-08-04, 10:15 PM
I have this Mleader lisp file that I need help with. I want the leader to underline the top text but i cant seem to find the system variable or command to do this?The variable "coordstr" stores the text for the MLeader. Knowing that, what do you need to add to the text to get an underline? The AutoCAD help files can tell you what the format codes are if you don't know them (Format Multiline Text in an Alternate Text Editor).