Jump to content

String with Getenv


mwade93

Recommended Posts

There are several types of System Variables:

> those that are saved in the drawing

> those that are saved in the drawing and are read only

> those that are saved in the registry

> those that are saved in the registry and are read only

> those that are not saved

> those that are not saved and are read only

 

The system variables store values of all the settings used in AutoCAD and the values are of the types string, integer and real. (edit: there are also the types: switch which can hold a value of "on" or "off"; character for single characters)

 

What you said about getvar is not totally true because it read sysvars from both the registry and the drawing. When you use setvar the new value (if it can be saved, read only and not saved cannot be saved) is saved in its defined location.

 

In the link to LT the documentation in my previous post you can see for each sysvar where it is saved (if at all) and if it is read only. If you had access to a full version of AutoCAD you can use the Express Tools System Variable dialog to see all that info in a dialog box. Unfortunately you have to select a sysvar to display its attributes, so you can't really do any screen shots to help. I'll see what I can cobble together over the next few days and post something early next week.

Edited by Tyke
Link to comment
Share on other sites

  • Replies 27
  • Created
  • Last Reply

Top Posters In This Topic

  • mwade93

    9

  • Tuns

    8

  • steven-g

    6

  • Tyke

    5

Top Posters In This Topic

Yeah sometimes I go a bit too quick for my fingers :) Autocad stores it's variables in the registry as well. The point I was trying to make, that is if I understand it correctly, is that the setvar and getvar commands are what you use to read and possibly write for the Autocad system variables the ones you will find in the Autocad help files. The setenv and getenv commands simplistically put, allow you to create user defined variables, but it is wider than that, in that you can also use those commands for the windows environment variables.

Link to comment
Share on other sites

Attached is a PDF file with a list of the System Variables in AutoCAD 2014 and AutoCAD LT 2014. The name of the variable is shown together with the data type of its value and where it is stored, in the drawing or in the registry. Some variables are not saved and some are read only, this information is also shown. The System Variables shown in red are not available in AutoCAD. There are no System Variables shown from any of the AutoCAD verticals. I cannot guarantee that the list is 100% correct or that it is complete. I did find omissions and errors in the AutoCAD documentation and tried where I could to correct them.

 

There are over 850 system Variables listed so it will take a while for you to memorize them ;). Let me know of any errors or omissions so I can update the list.

ACAD SYS VARS.pdf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...