AutoCAD variables

Variables can be saved in the drawing file or in the system, they can affect a single file or all of them.

Here's a collection of the ones I keep watching.

Notice: some variables that keep multiple values use a system by which the single values are added, often based on a binary code, e.g. OSMODE (the variable that keeps the current Osnaps setting) if set to 2^0=1 (endpoint) + 2^2=4 (center) + 2^5=32 (intersection) = 37 will snap to endpoints, centers and intersections.

I personally keep a menu with some variable switches ready for quick access, eg: turn on and off image frames.

Variable Sys/dwg Values Description
INSUNITS drawing 0 to 21 memorizes the current drawing units (meters, millimeters...)
MEASUREMENT drawing 0 or 1 memorizes the current drawing metric (imperial or ISO)
FIELDEVAL drawing 0 to 31 when the field has to be updated (opening the file, regenareting, plotting…)
UCSFOLLOW drawing 0 or 1 changing UCS rotates the view keeping the axes parallel to the screen (1) just rotates the axes (0)
VISRETAIN drawing 0 or 1 resets or remembers modification to Xref's layer states
VISRETAINMODE system Bitcode Use this system variable in conjunction with the VISRETAIN system variable to control which xref layer properties you want to automatically sync on reload
OFFSETGAPTYPE system 0 or 1 the offset is parallel (0) or constant-distant, with rounded corners (1)
PELLIPSE drawing 0 or 1 Creates a true ellipse object (0) or a polyline approximation (1)
BACTIONMODE system 0 or 1 in the block editor connects all the actions' icons together or let you move them around, the old way
HPLINETYPE system 0 or 1 controls if you can assign any linetype to an hatch or forces it to be continuous