Jump to content

Get system locate


RepCad

Recommended Posts

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.

Screenshot (1416).png

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by Lee Mac
  • Like 1
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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 by amir0914
Link to comment
Share on other sites

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 by pkenewell
  • Like 1
Link to comment
Share on other sites

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 by amir0914
Link to comment
Share on other sites

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