The drawing I'm working on is for an architectural product. Thus the units are set to Architectural, 1/16 precision. I have a number which is the weight of all the materials in the assembly which I want to include in an MTEXT section and I code it like this:
(setq Std_Notes (strcat Std_Notes "• APPROXIMATE HATCH WEIGHT: " (rtos hatchwt) " LBS."))
The variable in question is "hatchwt" which is currently equal to 142.431. But when this prints, of course it prints 142 7/16 LBS. Technically it's correct but I want this to print at 142.431 lbs. I guess I could change the units on the fly, wait for this to print, and then change the units back to architectural. That seems an awful way to handle this. Any suggestions? I've tried several of Lee Mac's rounding routines and they work great because this variable actually begins it's life as a string like this, 142.4312312883233...it's an incredible complex calculation of numbers that an Excel VBA program dumps to a text file and my VLISP file reads it in. I've used the rounding routine to get it down to three decimal places but the units setting turns this into a fraction rather than a decimal number. If push comes to shove I could round this down to a whole number (142) and just be done with it, but I like the idea of having the VLISP program create a drawing which is in total synch with the Excel file from which it all came.