RepCad Posted March 8, 2020 Posted March 8, 2020 Hi all guys, Is there a way to get current system locate via autolisp? I need to read that from visual lisp. thanks in advanced. Quote
Lee Mac Posted March 8, 2020 Posted March 8, 2020 (edited) Check the registry keys & descendents under: HKEY_CURRENT_USER\Control Panel\International Edited March 8, 2020 by Lee Mac 1 Quote
RepCad Posted March 8, 2020 Author Posted March 8, 2020 3 hours ago, Lee Mac said: Check the registry keys & descendents under: HKEY_CURRENT_USER\Control Panel\International Thank you lee mac, but this code not working : (vl-registry-read "HKEY_CURRENT_USER\Control Panel\International" ) Quote
Lee Mac Posted March 8, 2020 Posted March 8, 2020 (edited) 46 minutes ago, amir0914 said: Thank you lee mac, but this code not working : (vl-registry-read "HKEY_CURRENT_USER\Control Panel\International" ) That's not what I suggested, and you haven't escaped the backslashes. Open regedit, browse to the location indicated, and examine the set of subkeys to understand which you require. Edited March 8, 2020 by Lee Mac 1 Quote
RepCad Posted March 8, 2020 Author Posted March 8, 2020 Thanks for spent time for my post, but i need to read this with autolisp functions, not manual Quote
dlanorh Posted March 8, 2020 Posted March 8, 2020 1 hour ago, amir0914 said: Thanks for spent time for my post, but i need to read this with autolisp functions, not manual That is not what @Lee Mac meant. You need to use regedit to find the name of the correct Key/Val pair. In my case this was "sCountry" Then (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sCountry") Gave me United Kingdom 1 Quote
RepCad Posted March 9, 2020 Author Posted March 9, 2020 (edited) Sorry lee mac, now I understand what you mean, but I couldn't find the key of system locate in "International" andو "sCountry" isn't what I need. Edited March 9, 2020 by amir0914 Quote
pkenewell Posted March 9, 2020 Posted March 9, 2020 (edited) Perhaps (getvar "Locale")? If what you are wanting is the Language, then The AutoCAD setting would be the same would it not? In my system it is: (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International\\User Profile" "Languages") EDIT or this? (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International\\" "LocaleName") Edited March 9, 2020 by pkenewell 1 Quote
BIGAL Posted March 9, 2020 Posted March 9, 2020 Be careful but you can use regedit and search to find the answer. Mine returned Australia. 1 Quote
RepCad Posted March 10, 2020 Author Posted March 10, 2020 (edited) On 3/9/2020 at 11:22 PM, pkenewell said: Perhaps (getvar "Locale")? If what you are wanting is the Language, then The AutoCAD setting would be the same would it not? In my system it is: (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International\\User Profile" "Languages") EDIT or this? (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International\\" "LocaleName") Thank you BIGAL, this code really helped me : (vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International\\" "LocaleName") Edited March 10, 2020 by amir0914 Quote
BIGAL Posted March 10, 2020 Posted March 10, 2020 Yes returns true key value, "LocaleName" = en-au v's "sCountry" = Australia 1 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.