Author Topic: enviroment variable list  (Read 7821 times)

0 Members and 1 Guest are viewing this topic.

MeasureUp

  • Bull Frog
  • Posts: 462
enviroment variable list
« on: July 04, 2013, 09:38:31 PM »
Maybe this has been asked already.
I found a list in afralisp.net but I believe that is an old version and some of the E.V. are missing on the list. (for example "userdomain")
It would be much appreciated if you can tell me where to find an entire list of enviroment variables.

owenwengerd

  • Bull Frog
  • Posts: 451
Re: enviroment variable list
« Reply #1 on: July 04, 2013, 11:10:23 PM »
_SHELL<enter><enter>SET<enter> to see them all.
« Last Edit: July 04, 2013, 11:22:29 PM by owenwengerd »

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: enviroment variable list
« Reply #2 on: July 05, 2013, 12:59:40 AM »
Owen, that'll give all the Windows environment settings which ACad knows of.

For the others (acad specific) available through the Lisp getenv, you should also check acad's registry settings. Open RegEdit
Code: [Select]
WinKey+R
regedit<Enter>
Then browse to several of acad's registry paths. Note these examples are for ACA 2013, the version (R19.0), vertical (ACAD-B004:409) and profile (Profiles\AutoCAD) folders may differ depending on your acad and settings:
Code: [Select]
HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B004:409\FixedProfile
HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B004:409\Profiles\AutoCAD\General
There might also be others which are directly read through getenv.

Remember that unlike getvar, getenv requires you use the exact same capitalization. E.g. only (getenv "ACAD") will return the support paths, not (getenv "Acad") or (getenv "acad") or any other variant.

Also some new "user defined" sysvars are stored in
Code: [Select]
HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B004:409\Variables
HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R19.0\ACAD-B004:409\Variables
HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R19.0\ACAD-B004:409\Profiles\AutoCAD\Variables
These you get through getvar instead of getenv.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: enviroment variable list
« Reply #3 on: July 05, 2013, 06:18:12 AM »

BlackBox

  • King Gator
  • Posts: 3770
Re: enviroment variable list
« Reply #4 on: July 05, 2013, 12:29:10 PM »
Remember that unlike getvar, getenv requires you use the exact same capitalization. E.g. only (getenv "ACAD") will return the support paths, not (getenv "Acad") or (getenv "acad") or any other variant.

Especially given that according to the Registry.GetValue Method on MSDN:
Quote
...

Remarks

The string valueName is not case-sensitive.

...

... You'd think that the GetEnv LispFunction Method would not relegate users in this way.
"How we think determines what we do, and what we do determines what we get."

MeasureUp

  • Bull Frog
  • Posts: 462
Re: enviroment variable list
« Reply #5 on: July 07, 2013, 08:59:42 PM »
Thank you very much for to all for your input.
Lee's link does definitely help.
And to irneb, your tips do always help me to learn. With big thanks.
And big thanks to everyone.

By looking the registry folders I found that the locations of E.V. are slightly different between 2013 and 2014 versions.

huiz

  • Swamp Rat
  • Posts: 918
  • Certified Prof C3D
Re: enviroment variable list
« Reply #6 on: July 08, 2013, 03:31:22 AM »
Keep in mind that variables with the default setting are not saved into the Registry. Even if you set one once, after setting the default value are removed from Registry.

Here is a complete list, up to 2013 version: http://www.hyperpics.com/system_variables/

Also there is a complete command list as well and other information.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: enviroment variable list
« Reply #7 on: July 08, 2013, 03:39:31 AM »
System variables != Environment variables.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: enviroment variable list
« Reply #8 on: July 08, 2013, 03:45:25 AM »
also

Code - Scheme: [Select]
  1. (not (eq? System-variables Environment-variables))




Yes, I'm playing with scheme this week ...
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: enviroment variable list
« Reply #9 on: July 08, 2013, 04:47:10 AM »
See here:

http://www.theswamp.org/index.php?topic=42884
A Lisp version of Gile's C# code going through the registry to see which are used in getenv:
Code - Auto/Visual Lisp: [Select]
  1.  
  2. (defun get-acad-regroots (/ )
  3.   (mapcar (function (lambda (root path) (strcat root ((eval path)))))
  4.           '("HKEY_LOCAL_MACHINE\\" "HKEY_CURRENT_USER\\")
  5.           (cond (vlax-machine-product-key '(vlax-machine-product-key vlax-user-product-key))
  6.                 ('(vlax-product-key vlax-product-key)))))
  7.  
  8. (defun unique-sorted-strlst (strlst / prev test)
  9.   (vl-remove-if (function (lambda (next)
  10.                             (cond ((setq test (eq next prev)))
  11.                                   ((setq prev next)))
  12.                             test))
  13.     (acad_strlsort strlst)))
  14.  
  15. (defun get-acad-envvars (/ read-envvars add-path)
  16.   (defun add-path (subkey) (strcat path "\\" subkey))
  17.   (defun read-envvars (path / )
  18.     (apply 'append (cons (vl-remove-if-not 'getenv (vl-registry-descendents path t))
  19.                          (mapcar 'read-envvars (mapcar 'add-path (vl-registry-descendents path))))))
  20.   (unique-sorted-strlst (apply 'append (mapcar 'read-envvars (get-acad-regroots)))))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: enviroment variable list
« Reply #10 on: July 08, 2013, 04:53:51 AM »
also

Code - Scheme: [Select]
  1. (not (eq? System-variables Environment-variables))




Yes, I'm playing with scheme this week ...
:D More for this forum then:
Code - Auto/Visual Lisp: [Select]
  1. (/= System-variables Environment-variables)
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

huiz

  • Swamp Rat
  • Posts: 918
  • Certified Prof C3D
Re: enviroment variable list
« Reply #11 on: July 08, 2013, 07:45:53 AM »
System variables != Environment variables.

 :? Ah see it too now.

Monday morning, probably still processing the alcohol of the weekend

The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: enviroment variable list
« Reply #12 on: July 08, 2013, 10:33:22 AM »
If in doubt play the "first coffee was a dud" card.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst