PDA

View Full Version : What's the difference between (getenv) and GetSystemVariable?



Ed Jobe
2009-10-15, 10:13 PM
I'm working on a function to integrate with the MOVEBAK command. This command creates a sysvar called ACETMOVEBAK and its value can be returned with the lisp (getenv) function. VBA and .NET api funcions do not access this variable. What's the difference and is there a way to access it with .NET?

T.Willey
2009-10-15, 11:23 PM
As far as I know, ' getenv ' stands for get environment variable, where the other is just a system variable. Environment variables are stored within the registry, and are case sensitive. One example is

(getenv "acad") = nil

(getenv "ACAD") = string of the search paths, separated by by semicolons.

I could be totally wrong, but that is my understanding of them.

Kerry Brown
2009-10-16, 02:55 AM
This may give you some ideas

http://www.theswamp.org/index.php?topic=20237.msg246496#msg246496
http://www.theswamp.org/index.php?topic=20237.msg362446#msg362446

Ed Jobe
2009-10-16, 02:21 PM
As far as I know, ' getenv ' stands for get environment variable, where the other is just a system variable. Environment variables are stored within the registry, and are case sensitive. One example is

(getenv "acad") = nil

(getenv "ACAD") = string of the search paths, separated by by semicolons.

I could be totally wrong, but that is my understanding of them.
I understand that Tim, Sorry its been while since I've dealt with this area of the api. I used the wrong term. What I need is an equivalent to (setenv "AcetMovebak").

Ed Jobe
2009-10-16, 03:05 PM
I understand that Tim, Sorry its been while since I've dealt with this area of the api. I used the wrong term. What I need is an equivalent to (setenv "AcetMovebak").
In the registry, its under Fixed Profile>General.

Kerry Brown
2009-10-17, 06:57 AM
P/Envoking the acedGetEnv and acedSetEnv seem to address the registry location Fixed Profile->General.
I've updated the code at the link posted previously.

a tip for viewing code at theSwamp. In your profile, Look and Layout .. Change The Current Theme to Mercury which uses a full width and height code pane .. saves the horrible wrapping of code lines and vertical scrolling we see sometimes :)

Regards
Kerry

Kerry Brown
2009-10-19, 01:58 AM
yes, of course !
Thanks Tony.

Regards





This may give you some ideas

http://www.theswamp.org/index.php?topic=20237.msg246496#msg246496
http://www.theswamp.org/index.php?topic=20237.msg362446#msg362446[/quote]

Except you don't need StringBuilder in acedSetEnv(), just a String will do.

Ed Jobe
2009-10-19, 03:03 PM
P/Envoking the acedGetEnv and acedSetEnv seem to address the registry location Fixed Profile->General.
I've updated the code at the link posted previously.

a tip for viewing code at theSwamp. In your profile, Look and Layout .. Change The Current Theme to Mercury which uses a full width and height code pane .. saves the horrible wrapping of code lines and vertical scrolling we see sometimes :)

Regards
Kerry
Thanks alot for both tips.

Kerry Brown
2009-10-20, 09:49 AM
you're welcome.

How many questions do I need to answer to become a shining star ??

T.Willey
2009-10-20, 05:18 PM
you're welcome.

How many questions do I need to answer to become a shining star ??

You're answers have to effect enough people so that they want to add to you're reputation. The little scale thingy under your name.

Ed Jobe
2009-10-20, 07:49 PM
You can view how many reputation points you have by going to your control panel.