home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p065 / 4.img / LT0.LSP < prev    next >
Encoding:
Text File  |  1992-02-11  |  1.4 KB  |  39 lines

  1.  
  2. (defun C:LT0(/ sp ep pl n oer kword tes)
  3.    (if (/= s1 "4") (progn 
  4.    (setvar "ORTHOMODE" 1) 
  5.    (command "layer" "m" "pstair1" "")
  6.    (setq tes t) 
  7.    (while tes
  8.    (initget 1)
  9.    (setq sp (getpoint "\n┬Ñ╠▌╝²═╖╞≡╡π:"))
  10.    (setq pl nil pl (cons sp pl))
  11.    (while sp 
  12.       (initget "Undo")
  13.       (setq ep (getpoint sp "\n╗╪═╦Undo/<╧┬╥╗╡π>:"))
  14.       (if (= ep "Undo") (if (> (length pl) 1) (setq pl (cdr pl) sp (car pl)) (princ "*╗╪═╦═Ω┴╦*"))
  15.           (if (/= ep nil) (setq pl (cons ep pl) sp ep) (setq sp ep))
  16.       )
  17.    )
  18.    (setq pl (reverse pl) sp (nth 0 pl) n 1)
  19.    (initget "Up")
  20.    (setq kword (getkword "\╔╧Up/<╧┬>:"))
  21.    (if (= kword "Up") (setq kword "╔╧") (setq kword "╧┬"))
  22.    (setq ep (polar sp (angle (nth n pl) sp) (* 4 (getvar "userr1"))))
  23.    (command "text" "c" ep (* 3 (getvar "userr1")) "0" kword)
  24.    (command "pline" sp "w" 0 "")
  25.    (repeat (- (length pl) 1)
  26.       (command (nth n pl))
  27.       (setq n (1+ n))
  28.    )
  29.    (command)
  30.    (setq ep (nth (1- n) pl) sp (nth (- n 2) pl) sp (polar ep (angle ep sp) (* 2.5 (getvar "userr1"))))
  31.    (command "pline" ep "w" 0 (getvar "userr1") sp "")
  32.    (setq kword "No")
  33.    (initget "Yes No")
  34.    (setq kword (getkword "\n╩╟╖±╝╠╨°▒Ω╫ó┬Ñ╠▌╔╧╧┬╧▀? Yes/No <N>:"))
  35.                 (if (/= kword "Yes") (setq tes nil))
  36.  );while
  37.  ))
  38. )
  39.