This is a little lazy of me, but I need to get to bed . There are better ways, perhaps Tharwat might help you with one of them.
This takes advantage of the fact that a QLEADER is made up of two entities and the MTEXT is created last.
- (defun c:xy ( / el pt rot ) (setq rot (cons 50 (- (apply 'atan (cdr (reverse (getvar "UCSXDIR"))))))) (while (setq pt (getpoint "\n Pick Point : ")) (command "_.QLEADER" "_none" pt "_none" pause "" "" (strcat (rtos (car pt)) "mE, [url="file://\\P"]\\P[/url]" (rtos (cadr pt)) "mN") "") (entmod (subst rot (assoc 50 (setq el (entget (entlast)))) el)) ) (princ) )
Oh, and I did change the "\n" to "\\P" in the string. Change it back if you want. It just seems to me that most (not all) of the functions floating around the web that extract formatting strings remember "\\P" and forget "\n". |