Author Topic: Challenge: Get all system variables with values  (Read 11900 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5218
Challenge: Get all system variables with values
« on: October 11, 2006, 04:03:21 PM »
I don't know how one would accomplish this, and thought it might be fun.  I will look into this a little more when I get back from lunch.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Guest

  • Guest
Re: Challenge: Get all system variables with values
« Reply #1 on: October 11, 2006, 04:15:41 PM »
You mean besides....??


Quote
Command: setvar
Enter variable name or [?]: ?

Enter variable(s) to list <*>:

Then copy/paste.

MP

  • Seagull
  • Posts: 17527
Re: Challenge: Get all system variables with values
« Reply #2 on: October 11, 2006, 04:19:05 PM »
(c:sysvdlg)

:)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Guest

  • Guest
Re: Challenge: Get all system variables with values
« Reply #3 on: October 11, 2006, 04:22:40 PM »
Now what about the SETENV variables??  How does one obtain a list of those?!?  And are they the same for the various verticals??

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Challenge: Get all system variables with values
« Reply #4 on: October 11, 2006, 04:49:09 PM »
(c:sysvdlg)

:)
Pretty good, but it doesn't have them all.  There is no 'qaflags'.  I'm looking for them ALL.  :-)

Edit:
Now what about the SETENV variables??  How does one obtain a list of those?!?  And are they the same for the various verticals??
Good question.  I would like to know this answer also.

The detective work continues.
« Last Edit: October 11, 2006, 04:50:34 PM by T.Willey »
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17527
Re: Challenge: Get all system variables with values
« Reply #5 on: October 11, 2006, 04:52:19 PM »
Edit the sysvdlg.dat file?

:)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
Re: Challenge: Get all system variables with values
« Reply #6 on: October 11, 2006, 04:59:20 PM »
BRUTE FORCE

where list is ("AAA" "AAB" "AAC" etc...)
foreach item in list
if (getvar item) returns something
it's a var
if (getenv item) returns something
it's a var
if not
then it aint

when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Challenge: Get all system variables with values
« Reply #7 on: October 11, 2006, 05:02:35 PM »
Edit the sysvdlg.dat file?

:)
How about if you don't know what you are missing?  It doesn't look like it's in the 'atoms-family' which I must admit, I'm not sure about 'atom's to begin with.  I will continue to look around.

Thanks for pointing those out.  I did't even know about them.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Challenge: Get all system variables with values
« Reply #8 on: October 11, 2006, 05:03:39 PM »
BRUTE FORCE

where list is ("AAA" "AAB" "AAC" etc...)
foreach item in list
if (getvar item) returns something
it's a var
if (getenv item) returns something
it's a var
if not
then it aint


Trying not to go that route.  Who knows how long that process would take?  How many letters would you make the sting limits be?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17527
Re: Challenge: Get all system variables with values
« Reply #9 on: October 11, 2006, 05:11:47 PM »
How about if you don't know what you are missing?

Good question and I don't know. I'm guessing it's internal (in the AutoCAD executable, though that is pure speculation).

It doesn't look like it's in the 'atoms-family' which I must admit, I'm not sure about 'atom's to begin with.  I will continue to look around.

You're right about the atoms-family, it doesn't host the system variables. On that topic, you may find the tool in this thread interesting / useful / not.

Thanks for pointing those out.  I did't even know about them.

No problem My pleasureTim.

Edit: My wife says "No problem" all the time because everyone at her work says that and I can't stand it. Can't believe I just posted same. Carry on.

:)
« Last Edit: October 11, 2006, 05:15:02 PM by MP »
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Challenge: Get all system variables with values
« Reply #10 on: October 11, 2006, 05:23:46 PM »
You're right about the atoms-family, it doesn't host the system variables. On that topic, you may find the tool in this thread interesting / useful / not.
Very cool routine!  I'm not all up on atoms, so it may be over my head right now, but I can see some good things with it.

No problem My pleasureTim.

Edit: My wife says "No problem" all the time because everyone at her work says that and I can't stand it. Can't believe I just posted same. Carry on.

:)
I know what you mean.  I've been trying to kick the habbit of saying it also.  When people say 'thank you' and I respond with 'no problem' instead of 'you're welcome' or something, I'm just like 'why did I say that'  :-D oh well.  I will learn soon enough.

Thanks again Michael.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Re: Challenge: Get all system variables with values
« Reply #11 on: October 11, 2006, 05:42:04 PM »
My bright idea :-o?
You could set up a lisp with this:
Code: [Select]
;;  Check all words "aaaa" through "zzzzzzzzzzzzzzz"
(defun c:getvars ()
  (setq seed "aaaa")
  (while (< (strlen seed) 15)
    (if (setq var (getvar seed))
      (setq vlist (cons seed vlist))
    )
    ;; Here you will need to increment the string
    ;; Going through all carbonations, then add a character.
    ;;  too tired to do it though, it's beer 30
  ) ; while
  vlist
)
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Challenge: Get all system variables with values
« Reply #12 on: October 11, 2006, 05:42:44 PM »
I am doing some laundry work right now (so no time to play)....   :-P - I think that the master of master John Uhden did something like this.... it may still be available on his web site...

T.Willey

  • Needs a day job
  • Posts: 5218
Re: Challenge: Get all system variables with values
« Reply #13 on: October 11, 2006, 05:52:30 PM »
Alan,

 I have code I might be able to use to do it this way, I was just hoping that it was stored somewhere in the system, and could be retrived easly.  Doesn't look like it.

Luis,

  I didn't see anything on his side cadlantic.com.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

LE

  • Guest
Re: Challenge: Get all system variables with values
« Reply #14 on: October 11, 2006, 06:12:11 PM »
Can't find the code... but found a partial output from something he wrote (I remember seeing the code - man the age  :oops:)

http://discussion.autodesk.com/thread.jspa?messageID=2129722