Probably a really stupid question but.....
I have the following code:- which picks a point, separates the x & y co-ords then converts then to a string, which I use later
(setq targetpoint (getpoint "\nPlease enter target point?"));where are you looking at?
(setq xvalue (rtos (nth 0 targetpoint ) 2 3))
(setq yvalue (rtos (nth 1 targetpoint ) 2 3))
(setq easting (strcat xvalue "mE"))
(setq northing (strcat yvalue "mN"))
But I need it to always return the result to 3 decimal places. When I pick a point that is exact the easting and northing variable returns to 0 decimal places Ie if I pick 50000.567, 809333.000 It returns 50000.567mE, 809333mN
LUPREC is 3 and LUINTS is 2
Thanks for looking
Mark
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
DIMZIN 0 OR 3..
Controls the suppression of zeros in the primary unit value. Values 0-3 affect feet-and-inch dimensions only.
0 Suppresses zero feet and precisely zero inches
1 Includes zero feet and precisely zero inches
2 Includes zero feet and suppresses zero inches
3 Includes zero inches and suppresses zero feet
4 Suppresses leading zeros in decimal dimensions (for example, 0.5000 becomes .5000)
8 Suppresses trailing zeros in decimal dimensions (for example, 12.5000 becomes 12.5)
12 Suppresses both leading and trailing zeros (for example, 0.5000 becomes .5)
Seems to work, meaning that it includes the specified charaters, '000', in Acad 2000.
What version id you find this condition; and what is the actual code and repsonses?
DIMZIN was set to 8 on the drawing. In AutoCAD 2012.
Hence the suppresion of the zero
A quick setvar and It works fine now.