Sets an AutoCAD system variable to a specified value
(setvar varname value)
Arguments
A string or symbol naming a variable.
An atom or expression whose evaluated result is to be assigned to varname. For system variables with integer values, the supplied value must be between -32,768 and +32,767.
Return Values
setvar returns value.
If successful,Examples
Set the AutoCAD fillet radius to 0.5 units:
Command: (setvar "FILLETRAD" 0.50)
0.5
Notes on Using setvar
setvar to set a new value while a command is in progress, the new value might not take effect until the next AutoCAD command.
Some AutoCAD commands obtain the values of system variables before issuing any prompts. If you usesetvar function to change the AutoCAD system variable ANGBASE, the value argument is interpreted as radians. This differs from the AutoCAD SETVAR command in the Command Reference, which interprets this argument as degrees. When using the setvar function to change the AutoCAD system variable SNAPANG, the value argument is interpreted as radians relative to the AutoCAD default direction for angle 0, which is east or 3 o'clock. This also differs from the SETVAR command, which interprets this argument as degrees relative to the ANGBASE setting.
When using theYou can find a list of the current AutoCAD system variables in the Command Reference.
getvar function.
The