Satish Lele
satish.lele@gmail.com



View this page as YouTube Video Presentation
Setup Variables
This page is about setting up system variables. All the variables are set acad template drawing which is set when new drawing is opened. Most of these are good for Foot-Inch system. You have to modify some of these for metric system.
You can reset any variable by (setvar "variable_name" value). You can get the value of variable by (getvar "variable_name"). You can temporarily change some variables and later restore them. (setq old_osmode (getvar "osmode")).
A value of 0 will be stored for old_osmode, if current ortho is none. A value of 1 will be set if current osnap is end. You can change it to required value, do some action and then replace it by (setvar "osmode" old_osmode).
A value of 0 will be stored for old_osmode, if current ortho is none. A value of 1 will be set if current osnap is end. You can change it to required value, do some action and then replace it by (setvar "osmode" old_osmode).
osmode sets up osnap. It can have many values. osmode 0 is osnap none. osmode 1 is osnap Endpoint. osmode 2 is osnap Midpoint. osmode 4 is osnap centerpoint. osmode 8 is osnap node. osmode 16 is osnap quadrant. osmode 32 is osnap intersection. osmode 64 is osnap insertion. osmode 128 is osnap perpendicular. osmode 256 is osnap tangent. osmode 512 is osnap nearest.
You can have two osmode values at the same time. (setvar "osmode" 3) is osnap endpoint plus midpoint. (setvar "osmode" 20) is osnap centerpoint plus quadrant.

All the variables are set acad template drawing. Most of these are good for Foot-Inch system. You have to modify some of these for metric system. These are as follows.
(defun setup ( )
(setvar "aunits" 0)
(setvar "auprec" 2)
(setvar "blipmode" 0)
(setvar "dimexo" 1)
(setvar "dimexe" 1)
(setvar "dimscale" 1)
(setvar "dragmode" 2)
(setvar "donutid" 0)
(setvar "donutod" 1.5)
(setvar "fillmode" 1)
(setvar "gridmode" 0)
(setvar "hpname" "ansi31")
(setvar "hpscale" 0.3)
(setvar "ltscale" 20)
(setvar "luprec" 0)
(setvar "mirrtext" 0)
(setvar "pickadd" 1)
(setvar "pickauto" 1)
(setvar "pickdrag" 1)
(setvar "regenmode" 1)
(setvar "savetime" 10)
(setvar "snapmode" 0)
(setvar "snapisopair" 0)
(setvar "snapstyl" 1)
(setvar "textsize" 2.0)
(setvar "mirrtext" 0)
)
here for System Variables
here for Dimension Variables
backBack top