Results 1 to 6 of 6

Thread: How do I reset a user-created environment variable to be empty?

  1. #1
    Member
    Join Date
    2010-03
    Posts
    5

    Default How do I reset a user-created environment variable to be empty?

    I have created an environment variable called "SUFFIX", and assigned it the value "PSI", using the following command sequence:

    setenv<enter>SUFFIX<enter>PSI<enter>

    It works fine for what I'm doing (a toolbar button macro using DIESEL in AutoCAD LT 2011), but now I want to set the variable SUFFIX to be empty: not a space, not anything at all. I can't figure out a keyboard input that will do that.

    Perhaps there is an AutoCAD variable that consists of a null string? If so, I could "$M=" to get that null value and place it in SUFFIX.

    Any suggestions? Thanks in advance.
    Jolly Cholly

  2. #2
    Certifiable AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    2,718

    Default Re: How do I reset a user-created environment variable to be empty?

    (setenv "SUFFIX" "")
    will set it to ni.

    checking the value after that give me:
    Command: (getenv "SUFFIX")
    nil
    Last edited by cadtag; 2012-05-24 at 12:51 PM. Reason: correction
    Officially Awesome
    Real pirates wear silk suits & ties, and write EULAs
    The only thing more dangerous to the liberty of a free people than big government, is big business.

  3. #3
    Member
    Join Date
    2010-03
    Posts
    5

    Default Re: How do I reset a user-created environment variable to be empty?

    Thanks, it's a good thought. Unfortunately, it works in AutoCAD, but not in LT. The LT command sequence follows:

    Command: SETENV
    Enter variable name: SUFFIX
    Value: PSI


    Command: GETENV
    Enter variable name: SUFFIX
    PSI

    Command: SETENV
    Enter variable name: SUFFIX
    Value <PSI>: ""


    Command: GETENV
    Enter variable name: SUFFIX
    PSI
    Jolly Cholly

  4. #4
    Certifiable AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    2,718

    Default Re: How do I reset a user-created environment variable to be empty?

    LT -- ok, you might get a better response in the LT Forum. Typing either GETENV or SETENV at a command line here, (c3d 2011) just give me unknowncommand.

    However, Adesk often uses a . as a null response - no idea if that would work for you or not, since those commands don't exist here, I can't test them. It would probably return a period at the GETENV command, but maybe,,,
    Officially Awesome
    Real pirates wear silk suits & ties, and write EULAs
    The only thing more dangerous to the liberty of a free people than big government, is big business.

  5. #5
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2007-07
    Location
    Jo'burg SA
    Posts
    4,344

    Default Re: How do I reset a user-created environment variable to be empty?

    If you want to force this, you could always edit it manually in the registry. Sorry, not sure exactly where the LT registry path is kept, but it shouldn't be a whole lot different from the normal ACad one. E.g. after creating a SUFFIX envvar, I find it in:
    HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.2\ACAD-A001:409\FixedProfile\General\
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  6. #6
    Member
    Join Date
    2010-03
    Posts
    5

    Default Re: How do I reset a user-created environment variable to be empty?

    Thanks for all the responses.
    Jolly Cholly

Similar Threads

  1. environment variable for current page size
    By burchd in forum AutoLISP
    Replies: 1
    Last Post: 2008-05-27, 01:13 AM
  2. Is there an environment variable which controls hardcopy.log?
    By ralphsanchez in forum AutoCAD Plotting
    Replies: 0
    Last Post: 2008-02-11, 04:07 PM
  3. Apply service packs in multi-user environment
    By abdulhuck in forum Networks
    Replies: 2
    Last Post: 2007-02-28, 05:21 AM
  4. Worksets in a Single-User Environment
    By ajayholland in forum Revit - Worksharing/Worksets/Revit Server
    Replies: 7
    Last Post: 2003-06-03, 08:20 PM

Tags for this Thread

Posting Permissions

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