TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: carmi on March 26, 2020, 06:21:27 AM

Title: "Customize" multileader command
Post by: carmi on March 26, 2020, 06:21:27 AM
Hi guys,
i want insert a "mtext" annotation at the end of the leader line, as the below figure.
There is a lisp with this function or can you help me to write a new lisp?
Thank you very much
Title: Re: "Customize" multileader command
Post by: ahsattarian on November 22, 2020, 12:24:08 AM
This is a sample i use :




(defun c:xy ()
  (setq p1 (getpoint))
  (setvar "osmode" 0)
  (setvar "autosnap" 39)
  (setvar "orthomode" 0)
  (setq p2 (getpoint "\n Second Point : " p1))
  (grdraw p1 p2 1 1)
  (setvar "orthomode" 1)
  (setq p3 (getpoint "\n Third Point : " p2))
  (grdraw p2 p3 2 1)
  (setvar "orthomode" 0)
  (command "qleader" p1 p2 p3 0.0)
  (command (strcat "X=" (rtos (nth 0 p1))))
  (command (strcat "Y=" (rtos (nth 1 p1))))
  (command "")
  (princ)
)