Code Red > AutoLISP (Vanilla / Visual)
Evaluate a string....
(1/1)
Shade:
If I have a string like "32/3", is it possible to have autolisp evaluate the string so that 10.666667 is returned instead of 32?
(atof "32/3") returns 32, instead of 10.66667 which is what i need.
I have a cvs file I made in excel, where the values are stored in fractional format for better accuracy.
ie. 32/3, 8/3, 1/12, 8/5, etc.
I then take this data and import it into Autocad through a lisp that converts a cvs file to a list.
ie. ("32/3" "8/3" "1/12" "8/5")
I would then like to take the individual string and have autocad evaluate and return the fraction in decimal format.
ie. "32/3" is returned as 10.666666666667.
Is this possible?
Any help would be apprecited
Thanks. :mrgreen:
Chuck Gabriel:
Try distof instead of atof.
Shade:
Thanks mate,
Thats works for me!
Navigation
[0] Message Index
Go to full version