See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: What's the difference between (getenv) and GetSystemVariable?

  1. #1
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,526
    Login to Give a bone
    0

    Default What's the difference between (getenv) and GetSystemVariable?

    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?
    C:> ED WORKING....


    LinkedIn

  2. #2
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    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.

  3. #3
    Active Member
    Join Date
    2006-08
    Location
    Brisbane : GMT+10
    Posts
    87
    Login to Give a bone
    0

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    This may give you some ideas

    [oldurl]http://www.theswamp.org/index.php?topic=20237.msg246496#msg246496[/oldurl]
    http://www.theswamp.org/index.php?to...2446#msg362446
    Last edited by Kerry Brown; 2009-10-17 at 10:47 PM. Reason: Link updated.

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,526
    Login to Give a bone
    0

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    Quote Originally Posted by T.Willey View Post
    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").
    Last edited by Ed Jobe; 2009-10-16 at 02:44 PM.
    C:> ED WORKING....


    LinkedIn

  5. #5
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,526
    Login to Give a bone
    0

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    Quote Originally Posted by Ed Jobe View Post
    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.
    C:> ED WORKING....


    LinkedIn

  6. #6
    Active Member
    Join Date
    2006-08
    Location
    Brisbane : GMT+10
    Posts
    87
    Login to Give a bone
    1

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    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

  7. #7
    Active Member
    Join Date
    2006-08
    Location
    Brisbane : GMT+10
    Posts
    87
    Login to Give a bone
    1

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    yes, of course !
    Thanks Tony.

    Regards



    Quote Originally Posted by tony.tanzillo View Post
    Quote Originally Posted by Kerry Brown View Post
    This may give you some ideas

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

    Except you don't need StringBuilder in acedSetEnv(), just a String will do.
    Last edited by RobertB; 2009-10-19 at 04:28 PM. Reason: Fixed quote

  8. #8
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,526
    Login to Give a bone
    0

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    Quote Originally Posted by Kerry Brown View Post
    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.
    C:> ED WORKING....


    LinkedIn

  9. #9
    Active Member
    Join Date
    2006-08
    Location
    Brisbane : GMT+10
    Posts
    87
    Login to Give a bone
    2

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    you're welcome.

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

  10. #10
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: What's the difference between (getenv) and GetSystemVariable?

    Quote Originally Posted by Kerry Brown View Post
    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.

Page 1 of 2 12 LastLast

Similar Threads

  1. What's the difference
    By Tharwat in forum AutoLISP
    Replies: 5
    Last Post: 2010-09-09, 08:48 AM
  2. ??? $(if, $(=, $(getenv, r4n), pr), " ", FIX IT)
    By piper in forum AutoCAD Fields
    Replies: 2
    Last Post: 2007-11-13, 03:45 PM
  3. What's the difference between Max & Viz.
    By Paul P. in forum DV - The 3rd Dimension
    Replies: 16
    Last Post: 2007-05-16, 07:01 PM
  4. Replies: 1
    Last Post: 2007-01-25, 02:52 AM
  5. Hidden Candy (getenv "xx" )
    By kennet.sjoberg in forum AutoLISP
    Replies: 3
    Last Post: 2005-10-26, 12:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •