Sets an AutoCAD system variable to a specified value
(setvar varname value)
If successful, setvar returns value.
Set the AutoCAD fillet radius to 0.5 units:
Command: (setvar "FILLETRAD" 0.50)
0.5
Some AutoCAD commands obtain the values of system variables before issuing any prompts. If you use setvar to set a new value while a command is in progress, the new value might not take effect until the next AutoCAD command.
When using the setvar 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.
You can find a list of the current AutoCAD system variables in the Command Reference.
-
The getvar function.