I have a lisp routine that generates text in surveyors units for site plans. the problem (if you want to call it that) is that using ACAD surveyor units results in; for example: "N 89d 8' 10" E opposed to N 89d 08' 10" E. There is no zero as a place holder if the number is less than ten. Is there any way to modify the lisp routine so that it will add the zero? Even if it is "N 00d 00' 00" W" Below is the routine. Thank you Michael And thanks to Donnia for writing it. ;******************************************************************* ;Donnia M. Tabor-Hanson, Sept. 20, 2004 * ;This program will allow the user to pick the end points of a * ;line to get printout of the line's length and distance. * ;Currently it is set to decimal length and surveyors angles. * ;A little manipulation of the routine will allow any type of units * ;to be used. * ;******************************************************************* (defun C:TAG () (setq CO (getvar "OSMODE")) ;get the current value of osnap (setvar "OSMODE" 1) ;sets osnap to endpoint (setq P1 (getpoint " Select first endpoint of line: ")) (setq P2 (getpoint " Select other endpoint of line: ")) (setq D (distance P1 P2)) ;sets the value of the distance (setq D2 (/ D 12)) (setq DI (rtos D2 2 2)) ;changes to a string-2 decimal places (setq A (angle P1 P2)) ;defines the angle between pickpoints (setq ANG (* A (/ 180 pi))) ;converts the points angle for input (setq ANT (angtos A 4 4)) ;converts angle information to text (setq ANT2 (vl-string-subst "%%d" "d" ANT)) (setvar "OSMODE" 0) ;sets osnap to NONE (command "TEXT" "C" pause "24" ANG ANT2) ;executes text command (command "TEXT" "" (strcat DI "' ")) ;executes text command (setvar "OSMODE" CO) ;resets osnap to original setting );defun