Text Style / LISP

The following Lisp routine works fine, AS LONG AS I remember to set the text
style and text height before I run it.
How can I incorporate into the lisp routine 'STYLE' , with set parameters
???
(prompt "LOADing Z command...") ;will just load the function - to
;use, type its name like any other
;regular AutoCAD command
;*begin function definition
(
defun C:plZ () ;no ARGs in a 'C:function'
(setq te (getvar "TEXTEVAL")) ;save the state of TEXTEVAL
(setq cur_la (getvar "CLAYER")) ;and current LAYER name
(
command "setvar" "TEXTEVAL" 0 ;place values, not varnames 1 too 0
by jb
"layer" "m" "coords1" "" ;MAKE coords1 layer
)
(initget 16) ;make sure getpoint returns the Z
;value even if the system variable
;FLATLAND is set true (1)
(setq pt1 (getpoint "Get coords for what point? ")) ;get 1st point
(initget 16)
(
setq pt2 (getpoint "Location for coord text? ") ;get 2nd point
x (strcat "X " (rtos (car pt1))) ;convert real to string
y (strcat "Y " (rtos (cadr pt1))) ;and concatanate to
axes
z (strcat(rtos (caddr pt1)) "m") ;names (X,Y & Z)
)
(
command "text" pt2 0 Z ;place the z text, with no rotation
)
"layer" "s" cur_la "" ;restore layer &
"setvar" "TEXTEVAL" te ;TEXTEVAL state
)
;*
end function definition
Reply to
Julian Brotherton
Loading thread data ...
(command ".STYLE" "StyleNameHere" "" "0.0" "" "" "" "" "")
Reply to
TomD

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.