TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: TopoWAR on September 27, 2014, 11:34:49 AM

Title: problem with decimal
Post by: TopoWAR on September 27, 2014, 11:34:49 AM
hello all, I was brought autocad 2013 problem, the following code returns a value without decimals me and I wonder what is the reason? I have searched and not what is the problem, I appreciate your help!

Code: [Select]
(setq a (atof "215418.631"))

(rtos a 2 3)

returns -> "215418.000"
Title: Re: problem with decimal
Post by: CAB on September 27, 2014, 11:50:33 AM
And what if you use (rtos a 2 14)
Title: Re: problem with decimal
Post by: TopoWAR on September 27, 2014, 12:29:09 PM
CAB , testing testing and found the problem, the cause is a function of DOS_LIB, if I apply the following function gives me the problem of decimals, not having to do this but only because in autocad 2013, it is strange

Code: [Select]
(dos_getfiled "Archivo de Coordenadas" (if archivo_ruta archivo_ruta (getvar "dwgprefix")) "Archivo de Texto (*.txt)|*.txt|Todos los Archivos (*.*)|*.*||")
Title: Re: problem with decimal
Post by: RC on September 29, 2014, 11:47:27 AM
not a problem here
What version of Dos_lib are you running??
Title: Re: problem with decimal
Post by: TopoWAR on September 29, 2014, 12:15:21 PM
not a problem here
What version of Dos_lib are you running??

I know, the version is 9.0.1 dos_lib last, when I asked for help did not know that the problem was outside lisp.
Title: Re: problem with decimal
Post by: RC on September 30, 2014, 12:51:28 PM
I too am running DOS_LIB 9.0.1 on AutoCAD 2013 and am NOT having the issue.  This may not be a DOS_LIB issue.