Michaels Posted July 25, 2010 Posted July 25, 2010 Check this out in your Autocad command line: (setq num 12.123456) And here is the result: 12.1235 Why is that ? ... it's not return the same number which is 12.123456 And I tried to inserted into a text, and it come like this: (vl-cmdf "text" pause "" "" num)12.12345600000000 Regards Michaels Quote
David Bethel Posted July 25, 2010 Posted July 25, 2010 The sysvar LUPREC controls the decimal accuracy that is displayed on the screen. It doesn't change the value of the variable, just the display mode. You do need to keep in mind the ACAD REALs are limited to 15 significant places. I think LUPREC is still limited to 8 places. So when comparing REALs, look into the (equal) function in lieu of (=). -David Quote
rkmcswain Posted July 25, 2010 Posted July 25, 2010 And I tried to inserted into a text, and it come like this: If you are interested in retrieving the value as a string, then do something like this: (rtos num 2 16), which in your example should return "12.1234560000000" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.