home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / GR / GR505.ZIP / LSP.EXE / LINETEXT.LSP < prev    next >
Text File  |  1989-01-14  |  743b  |  17 lines

  1. (defun c:linetext (/ txt e1 a1 tb ip line p1)(setvar"cmdecho"0)
  2. (command"osnap" "nea")
  3. (setq e1(entsel"\nSelect line to place text on: "))
  4. (command"osnap""nea")
  5. (setq p1(nth 1 e1))
  6. (setq line(car e1))
  7. (setq a1(getangle p1"\nAngle for text: "))
  8. (initget  "Top Bottom")
  9. (setq tb(getkword"\nIs the text on Top or Bottom<T>: "))
  10. (if(= tb nil)(setq tb "T"))
  11. (setq tb(strcase(substr tb 1 1)))
  12. (command"osnap""none")
  13. (if(= tb "T")(setq ip(polar p1(+ a1 (* pi 0.5))(* 1.2(* (getvar"dimscale")(getvar"dimtxt"))))))
  14. (if(= tb "B")(setq ip(polar p1(+ a1 (* pi 1.5))(* 1.2(* (getvar"dimscale")(getvar"dimtxt"))))))
  15. (setq txt(getstring T "\nEnter TEXT: "))
  16. (command"text" "m"ip (*(getvar"DIMSCALE")(getvar"dimtxt"))(angtos a1) txt)(prin1))
  17.