;Filename: ARDOLEAD.LSP ;Draws line or squiggly line with arrow or donut and text. (defun iff () (if (and (> a1 (/ pi 2)) (< a1 (*(/ pi 2) 3)) ) (progn (setvar "orthomode" 1) (setq p3 (getpoint pt "\nText location: ")) (command "pline" pt "w" "0" "0" p3 "") (setq p4 (polar p3 pi d4)) (command "redraw") (setvar "orthomode" 0) (command "dtext" "j" "mr" p4) );progn (progn (setvar "orthomode" 1) (setq p3 (getpoint pt "\nText location: ")) (command "pline" pt "w" "0" "0" p3 "") (setq p4 (polar p3 0.0 d4)) (command "redraw") (setvar "orthomode" 0) (command "dtext" "j" "ml" p4) );progn );if );iff ;Leader line with arrow or donut and text. (defun ADT () (setq p1(getpoint"\nStart location: ")) (setq pa p1) (setq p2(getpoint p1 "\nElbow location: ")) (setq a1(angle p1 p2)) (setq a4(angle p1 p2)) (setq d1(/ (distance p1 p2) 8)) (command "pline" p1 "w" "0" "0" p2 "") (while p2 (setq p1 p2) (setq pt p2) (setq p2(getpoint p1 "\nNext Elbow location or Or Enter to Stop: ")) (command "pline" p1 "w" "0" "0" p2 "") );while (initget "Donl Arrl") (setq ans1 (getkword "\n(A)rrow-leader or onut-leader ? ")) (if (= ans1 nil)(setq ans1 "Donl")) (cond ((wcmatch ans1 "Donl")(donut)) ((wcmatch ans1 "Arrl")(arrow)) );cond (iff) ;(setvar "splinesegs" segs) );adt ;Squiggly line with arrow or donut and text. (defun ART () (setq p1(getpoint"\nStart location: ")) (setq pa p1) (setq p2(getpoint p1 "\nElbow location: ")) (setq a1(angle p1 p2)) (setq pt p2) (setq a2(+ a1 (* pi 0.5))) (setq a3(+ a1 (* pi 1.5))) (setq d1(/ (distance p1 p2) 5)) (setq p3a(polar (polar p1 a1 (* 4 d1)) a2 d1)) (setq p4(polar (polar p1 a1 d1) a3 d1)) (setq p5(polar (polar p1 a1 (* 4.5 d1)) a2 (* 0.25 d1))) (setq a4(angle p1 p3a)) (command "pline" p1 "w" "0" "0" p3a p4 p5 p2 "") (command "pedit" "L" "S" "X") (initget "Don Arr") (setq ans2 (getkword "\n(A)rrow-leader or onut-leader ? ")) (if (= ans2 nil)(setq ans2 "Don")) (if (= ans2 "Don")(donut)) (if (= ans2 "Arr")(arrow)) (iff) ;(setvar "splinesegs" segs) );art (defun donut () (command "color" "c") (command "donut" "0.001" d2 pa "") (command "color" "w") );donut (defun arrow () (command "color" "r") (command "pline" pa "w" "0" (rtos (* 0.25 dsc)) (polar pa a4 dsc) "") (command "color" "w") );arrow ;STOPWATCH (setq stime (fix (getvar "date"))) (setq endtime 2452821);30-jun-2003 (if (> stime endtime) (progn (setq stime nil endtime nil) (princ) (alert " **********LISP OVERDUE********** Email to: nguyen6757@rogers.com ") (exit) ) (progn (setq stime nil endtime nil) (princ)) ) (defun c:arl () (setq dsc (getvar "dimtxt")) (setq d2 (/ dsc 4)) (setq d4 (/ dsc 2)) (princ"\nIf need Arrow or Donut bigger, Reset DIMTXT.")(princ) (initget "Squ Lea") (setq ans3 (getkword "\n(S)quiggle or eader ? ")) (if (= ans3 nil)(setq ans3 "Lea")) (cond ((wcmatch ans3 "Squ")(art)) ((wcmatch ans3 "Lea")(adt)) );cond (princ"\nARDOLEAD.LSP Draws line or squiggly line with arrow or donut and text. Start-> ARL")(princ) );arl (princ"\nARDOLEAD.LSP Draws line or squiggly line with arrow or donut and text. Start-> ARL")(princ)