Search the Community
Showing results for tags 'decimals'.
-
excel visual lisp Lisp reads excel to only 4 decimal places.
KerrCAD posted a topic in AutoLISP, Visual LISP & DCL
Am writing lsp code to process lat/lng data points. The source program writes out to xlsx. When I read in the file (many thanks to Shadi - see link below) it rounds/truncates the lat/lng data to 4 decimal places. I'd like to get as much precision as possible. Can anyone help me through this? Shadi's code starts with this: (vlax-get-object "Excel.Application.16") and reads the entire file to a list quite quickly. But I cannot find a way around the 4 decimal limit read into AutoCAD. Many Thanks! Excel source data: Lisp result (with job name deleted): -
I have two instances: 1) I have the number for example 1.025, and I want the computer give me as answer 1.10, other example will be: I have 1.08, and I want the computer give me as answer 1.10. its like a rounding up. 2)I have the number for example 0.7625, and I want the computer give me as answer 0, 7 other example will be: I have 0.51, and I want the computer give me as answer 0.5 (can use the first decimal) its like a rounding down ¿How can I do? the code "round" doesnt exist anymore.