System variables

Discussion in 'AutoCAD' started by Fredrik Emilsson, May 14, 2004.

  1. Hi all!

    Sorry if I´m asking a stupid question here...

    Where are all system variables saved? In help it says "Registry", but if you
    search for "Textfill" for example you can´t find anything.

    I want to access them from a external program.

    Do someone know where I can read about them or where I can find some tip
    about generell programming?

    Thanks in advance!

    /Fredrik
     
    Fredrik Emilsson, May 14, 2004
    #1
  2. Fredrik Emilsson

    ECCAD Guest

    At Command: prompt,
    Type in:
    setvar
    ?
    *

    Acad Help, Command Reference, System Variables.

    Bob
     
    ECCAD, May 14, 2004
    #2
  3. Hi Bob!

    Thanks, but I was wondering if the variables are saved somewhere so that you
    can access from a external program somehow...

    As it says "Registry" in the help files i was wondering what registry they
    mean.

    Profiles etc. have their own registry key, but some of the system variables
    such as textfill etc. are saved somewhere else?

    I have found that some of the variables are saved in the profile and some
    are not.

    Right or wrong?



    /Fredrik
     
    Fredrik Emilsson, May 14, 2004
    #3
  4. Fredrik Emilsson

    ECCAD Guest

    Yes,
    'Some' of the variables are stored in registry, not all ..
    In Visual Lisp, there are ways to 'read' or 'write' values
    to the registry. Pretty tricky stuff. If you are not 'totally' comfortable with modifying the registry, I would suggest just
    setting the variables you need to adjust with straight - good old AutoLisp.

    Bob
     
    ECCAD, May 14, 2004
    #4
  5. Thanks Bob.

    What I want to do is to read and write system variables from a external
    program.

    Do you think its possible to do that?

    Thats also why i´m not satisfied with just setting the variables from
    AutoCAD, maybe I´m trying to solve this in the wrong way?

    /Fredrik

    with modifying the registry, I would suggest just
     
    Fredrik Emilsson, May 14, 2004
    #5
  6. Fredrik Emilsson

    Paul Turvill Guest

    AFAIK, it can't be done. But if you tell us what you're trying to
    accomplish, someone may have a scheme that will work for you. Since system
    variables are only in effect when AutoCAD is open and functioning, there
    would seem to be little or no advantage to setting them externally. BTW, if
    you look in HELP, you'll see where each is stored: some in the drawing file,
    some in the registry, and some not at all.
    ___
     
    Paul Turvill, May 14, 2004
    #6
  7. Fredrik Emilsson

    ECCAD Guest

    Bit of a 'cludge', but you (could) have the external program
    (read / write) the acaddoc.lsp (text based). Output / append
    to this file - something like..
    $O = "(setvar " & chr(34) & "OSMODE" & chr(34) & " 0)"
    Print #1, $O
    ...
    Next time Acad is started, will read these settings..

    Bob
     
    ECCAD, May 14, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.