svorgodne Posted May 22, 2018 Posted May 22, 2018 Hello everyone, I think there should be a system variable or am autolisp program to identify what are is the decimal separator. This is important for me because I am writing a lisp routine that exports data from autocad to an excel table. Thanks in advance S Quote
Grrr Posted May 22, 2018 Posted May 22, 2018 Check how is assigned the sep variable in Lee Mac's Write CSV subfunction. Quote
lrm Posted May 22, 2018 Posted May 22, 2018 Try the following. It will give you he character of the decimal separator. (setq sep (getvar "dimdsep")) Quote
svorgodne Posted May 23, 2018 Author Posted May 23, 2018 Thanks lrm, what I was meaning was if it was possible thru autolisp to know what is the Windows system configuration. For example in Excel in Austria, the CSV files should have a semicolon instead of a comma and I was wondering if it would be possible to know directly from Autocad thru autolisp. thanks anyhow. Cheers S Quote
ronjonp Posted May 23, 2018 Posted May 23, 2018 Perhaps: (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sList") Quote
lrm Posted May 23, 2018 Posted May 23, 2018 Perhaps: (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sList") I set the decimal symbol to comma in my Windows 10 system. Opened Excel to test it out by entering =pi() in a cell and got a comma for the decimal symbol (3,14159...). I entered your registry function in AutoCAD and got ",". I then changed the Windows decimal symbol to a period, restarted the system, opened AutoCAD and gave your function again and still got a ",". I checked pi again in Excel and got 3.14159... verifying that the decimal symbol had been changed to period. I think the function to use may be: (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sDecimal") Quote
ronjonp Posted May 23, 2018 Posted May 23, 2018 I set the decimal symbol to comma in my Windows 10 system. Opened Excel to test it out by entering =pi() in a cell and got a comma for the decimal symbol (3,14159...). I entered your registry function in AutoCAD and got ",". I then changed the Windows decimal symbol to a period, restarted the system, opened AutoCAD and gave your function again and still got a ",". I checked pi again in Excel and got 3.14159... verifying that the decimal symbol had been changed to period. I think the function to use may be: (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sDecimal") That's probably correct. I misread the question and interpreted as list separator. 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.