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 >
Wrap
Text File
|
1989-01-14
|
743b
|
17 lines
(defun c:linetext (/ txt e1 a1 tb ip line p1)(setvar"cmdecho"0)
(command"osnap" "nea")
(setq e1(entsel"\nSelect line to place text on: "))
(command"osnap""nea")
(setq p1(nth 1 e1))
(setq line(car e1))
(setq a1(getangle p1"\nAngle for text: "))
(initget "Top Bottom")
(setq tb(getkword"\nIs the text on Top or Bottom<T>: "))
(if(= tb nil)(setq tb "T"))
(setq tb(strcase(substr tb 1 1)))
(command"osnap""none")
(if(= tb "T")(setq ip(polar p1(+ a1 (* pi 0.5))(* 1.2(* (getvar"dimscale")(getvar"dimtxt"))))))
(if(= tb "B")(setq ip(polar p1(+ a1 (* pi 1.5))(* 1.2(* (getvar"dimscale")(getvar"dimtxt"))))))
(setq txt(getstring T "\nEnter TEXT: "))
(command"text" "m"ip (*(getvar"DIMSCALE")(getvar"dimtxt"))(angtos a1) txt)(prin1))