In this installment of the "In The Box" series, I'll look at the System Variable Editor from the Express Tools. If you prefer to skip the reading part, you can jump to the bottom of this post and watch a short video of me demonstrating the System Variable Editor.
Command-line access for this feature is the SYSVDLG command. In the menu, it's under Express->Tools->System Variable Editor. On the Express Tools ribbon tab, it's on the Tools panel as System Variables.
SYSVDLG was created to be a one-stop-shop to view and edit AutoCAD system variables. From this dialog, you can scroll a list of the AutoCAD system variables and for each selected system variable you can see the default value, current value, type, where it's saved, description, and you can edit the system variable value right in the dialog. If that's all SYSVDLG did it would be moderately convenient but maybe not a regular use tool. Fortunately, it does a bit more.
Wildcard Search
The edit field directly above the system variable list allows for filtering the list based on user input. Want to see all those system variables related to hatch patterns? Enter HP* and the list will show you only the matching names:
Trying to remember the name of a system variable and all you know is that it contained "ANG"? Filter the list for *ANG*:
When nothing is entered in the edit field, the list resets to display all system variables. The ability to do wildcard searches makes it quick and easy to find specific system variables by name.
Saving a List of System Variables
SYSVDLG allows you to write a list of system variables out to a file. When nothing is selected in the list you can click the "Save All…" button and it will write out the entire list of system variables. When the list is filtered (via wildcard) the button changes to "Save Filtered…" and it only writes out the filtered list. When two or more system variables are selected in the list the button changes to "Save Selected…" and it only writes out the selected system variables. When writing out the list, there are two format options for the output file: SVF and SCR.
If you save to a file name with an SVF extension, it creates a file that can be read back in to SYSVDLG using the "Read…" button. Reading in an SVF file changes the current system variable values to match those saved in the file. Want to recreate the same dimension variable settings on another machine? Filter the list on DIM*, save the file, move to the other machine and read that file back in to SYSVDLG with the "Read…" button.
When saved as an SCR file, it is automatically ready to run as a standard script. Here is the format of an SCR file output from SYSVDLG:
…
(setvar "APBOX" 0)
(setvar "APERTURE" 10)
(setvar "APPLYGLOBALOPACITIES" 0)
; read-only - APSTATE 0
; read-only - AREA 0.0000
(setvar "ATTDIA" 0)
(setvar "ATTIPE" 0)
(setvar "ATTMODE" 1)
…
The file is written using the AutoLISP (setvar) function to restore the system variable values and it also includes the read-only values (but commented out since you can't actually set them anyway).
In addition to using these files to easily restore system variable values, you can also use them to diff an environment. Do you want to see how system variable settings differ between two drawings or machines? Save out two separate files from SYSVDLG and use WinDiff or your favorite file diffing tool to find the differences. With over 850 system variables in AutoCAD, comparing two output files from SYSVDLG could be the fastest way to find your culprit system variables.
Caveats With Verticals
The System Variable Editor was introduced about 10 years ago and does not get the system variable list directly from AutoCAD but from an installed file named SYSVDLG.DAT. This file is updated with each AutoCAD release to include new system variables and any changes to existing ones. As far as I know, this file only contains AutoCAD system variables and does not include system variables that are specific to vertical products, such as AutoCAD Architecture or AutoCAD Mechanical, unless those product teams updated their own version of that file (which I doubt). All of which is to say: if you're using a vertical product, SYSVDLG will likely report an incomplete list of the system variables that are actually available in your product. Just be aware of that.
The System Variable Editor is one of those lesser-known, unsung heros in my AutoCAD toolbox. It's my go-to feature when looking for a particular system variable or needing to compare different environments.