(defun c:nn (/ echold osmold th ip in asz)
(setq echold (getvar “cmdecho”))
(setq osmold (getvar “osmode”))
(setq asz (* (getvar “dimscale”) (getvar “dimasz”)))
(setvar “osmode” 0)
(setvar “cmdecho” 0)
(if (/= 0 (cdr (assoc 40 (tblsearch “style” (getvar “textstyle”)))))
(setq th (cdr (assoc 40 (tblsearch “style” (getvar “textstyle”)))))
(setq th (* (getvar “dimscale”) (getvar “dimtxt”))))
(while (setq sp (getpoint “nLeader start: “))
(initget 1)
(setq tp (getpoint sp “nTo point: “))
(if (> (distance sp tp) (* asz 1.5))
(progn
(if (= (getvar “dimblk”) “”)
(command “solid” sp (polar sp (+ (angle sp tp) 0.165)
(* asz 1.0138))
sp (polar sp (- (angle sp tp) 0.165)
(* asz 1.0138))
“”)
(command “insert” (getvar “dimblk”) sp asz asz
(angtos (+ (angle sp tp) pi) 0 6))
);;if
(setq sp (polar sp (angle sp tp) asz))
);;progn
);;if
(command “line” sp tp “”)
(setq lsp sp sp tp)
(while (setq tp (getpoint sp “nTo point: “))
(command “line” sp tp “”)
(setq lsp sp sp tp))
(setq ip (polar sp (angle lsp sp) (* 1.15 th)))
(command “circle” ip (* 1.15 th))
(setq in (substr (getstring
“nItem designation (two characters max.): “) 1 2))
(if (/= 0 (cdr (assoc 40 (tblsearch “style”
(getvar “textstyle”)))))
(command “text” “m” ip “0” in)
(command “text” “m” ip th “0” in)
);;if
);;while
(setvar “osmode” osmold)
(setvar “cmdecho” echold)
(prin1)
)
(defun gerr(g)
(if (/= g “Function cancelled”)
(princ (strcat “nError: ” g))
)
(setvar “cmdecho” 1)
(setvar “blipmode” 1)
(setq *error* olderr)
(princ)
)