Simply change the last number in the function as the following.
It is better also to paste your codes to let us check them for you if any other mistakes found...Code:(rtos YourNumber 2 3 )
Regards
Tharwat

Registered forum members do not see this ad.
I have a lisp routine which reads point coordinates from excel sheet and inserts blocks at those points. All the points have 3 decimal places. For example
614332.785, 2619494.544
The routine works fine.
Now in another routine I get the base points of the blocks and compare them to their coordinates in the excel file they are not same but have slight difference for example the base point of the block inserted at above point would be reported by lisp as (614333.0, 261949e+006). What is the reason for this difference. How can I get the same exact value.
Similarly suppose their is a value 6123.494 stored in an excel cell when I extract that value (using vlisp) the system shows value of variant to be 6123.494 but when I call (valx-variant-value) the returned value becomes 6123 Why this .494 part is omitted. Please guide.
Thanks
Simply change the last number in the function as the following.
It is better also to paste your codes to let us check them for you if any other mistakes found...Code:(rtos YourNumber 2 3 )
Regards
Tharwat

Thanks Tharwat,
But I want the end resut as a real number and not string. rtos perhaps converts result to String.
Any Suggestions?
Here it goes;
RegardsCode:(setq a 15.12345) 15.1235 (setq b (rtos a 2 3)) "15.123" (setq c (atof b)) 15.123
Tharwat
Registered forum members do not see this ad.
Read up on EQUAL in the developer's guide.
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
Bookmarks