Jump to content

Recommended Posts

Posted

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

Posted

Try the following. It will give you he character of the decimal separator.

(setq sep (getvar "dimdsep"))

Posted

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

Posted

Perhaps:

(vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sList")

Posted
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")

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...