Copy of my setup, needs to be updated for more recent versions of ACAD.
;;; variable setting mechanism
;;; called from 'AlansAutoLoad.lsp'
;;;
;;; After setting the global variable, call the function, (vl-propagate
;;; 'globalVariable) where globalVariable is the symbol name of your global
;;; variable. This will copy the value of globalVariable into all open document
;;; namespaces and set its value in any subsequent drawings opened during the
;;; current AutoCAD session.
(defun ACADset_vars (/ var)
;;======================================================
;;BEGINNING OF SYSTEM VARIABLE SETTING
;;======================================================
(if (>= (substr (getvar 'acadver) 1 4) "16.1")
(progn
(setvar 'backgroundplot 0)
(setvar 'draworderctl 3)
(setvar 'fieldeval 31)
(setvar 'hpgaptol 1)
(setvar 'osnaphatch 0)
(setvar 'xreftype 0)
)
(princ "\n <<Ignored AutoCAD 2005 Variable List>>")
)
(princ)
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(if (>= (substr (getvar 'acadver) 1 4) "16.0")
(progn
(setvar 'hpassoc 1)
(setvar 'peditaccept 0)
(setvar 'reporterror 0)
(setvar 'startup 1)
(setvar 'gripobjlimit 30000)
(setvar 'mtextfixed 1)
)
(princ "\n <<Ignored AutoCAD 2004 Variable List>>")
)
(princ)
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(if (>= (substr (getvar 'acadver) 1 5) "15.06")
(progn
(setvar 'dimassoc 1)
(setvar 'whipthread 3)
)
(princ "\n <<Ignored AutoCAD 2002 Variable List>>")
)
(princ)
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(if (>= (substr (getvar 'acadver) 1 5) "15.05")
(progn
(setvar 'rememberfolders 1)
)
(princ "\n <<Ignored AutoCAD 2000i Variable List>>")
)
(princ)
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(if (>= (substr (getvar 'acadver) 1 4) "15.0")
(progn
(if (and (= (getvar "MEASUREMENT") 1) ;if metric, CAB
(= 7 (acet-ui-message "Override DWG settings, force Imperial? " "DWG is Metric" 20 )))
(progn
;in DWG (setvar "lunits" 2 ) ; 4=Arch 2=decimal
(setvar "measureinit" 1) ; Metric
;in DWG (setvar "insunits" 1) ; block insert units Millimeters {Will Scale}, 0=unitless {Will not Scale}
;; only if the blocks to be inserted are metric would you set insunits to 0 or 4
(alert "Run \"2Imperial\" to switch back. \nInsUnits is still set to inches. ")
)
(progn ; Imperial
(setvar "lunits" 4 ) ; 4=Arch 2=decimal
(setvar "measurement" 0) ; English
(setvar "measureinit" 0) ; English
(setvar "insunits" 1) ; 0=unitless 1=inches 2=feet, block insert units
)
)
;; Note- Use radians within LISP to set variables
(setq var (list
(list "angbase" 0 ) ;
(list "angdir" 0 ) ; CCW
(list "apbox" 0 ) ; Aperture box off 0
(list "aperture" 10 ) ; zone of detection
(list "ATTDIA" 1 ) ; ** new
(list "ATTREQ" 0 ) ; ** new do not request attrib when inserting
(list "aunits" 0 ) ; 0 = degrees 4 = survey
(list "auprec" 4 ) ; decimal places displayed for angles
(list "autosnap" 7 ) ;
(list "blipmode" 0 ) ; o = blips off
(list "chammode" 0 ) ; require 2 distances
(list "cecolor" "bylayer")
(list "celtype" "bylayer")
(list "cmddia" 1 )
(list "cmdecho" 1 )
(list "coords" 1 )
(list "cursorsize" 5 ) ; size of cross
(list "demandload" 2 ) ; 2 needed for some commands, disabled 0
(list "dimaso" 1 ) ;
(list "dimsho" 1 )
(list "dragmode" 2 ) ; display outline
(list "dragp1" 10 )
(list "dragp2" 25 )
(list "edgemode" 1 ) ; trim to extension
(list "expert" 4 )
(list "facetres" 2 )
(list "filedia" 1 ) ; display dialogs, not command line prompts
(list "filletrad" 0 )
(list "fillmode" 1 ) ;
(list "gridmode" 0 ) ; grid off
(list "grips" 1 ) ;
(list "gripsize" 3 ) ; grip box size
(list "highlight" 1 )
(list "ISAVEPERCENT" 0) ; make autosave save entire drawing
(list "insbase" (list 0 0 0)) ;
(list "isolines" 4 )
(list "limcheck" 0 ) ; 0= allow create obj outside limits
(list "luprec" 5 ) ; decimal places displayed for linear
(list "maxactvp" 50 ) ; max viewport to be regenerated
(list "maxsort" 500) ; max num of layers to sort in layer manager
(list "mbuttonpan" 1) ;
(list "mirrtext" 0 ) ; 1=mirror text 0=backwards test
(list "offsetgaptype" 0 ) ;
;; Controls how potential gaps between segments are treated when polylines are offset.
;; 0 Fills the gaps by extending the polyline segments
;; 1 Fills the gaps with filleted arc segments (the radius of each arc segment is equal to the offset distance)
;; 2 Fills the gaps with chamfered line segments (the perpendicular distance to each chamfer is equal to the offset distance)
(list "NOMUTT" 0 )
(list "osmode" 175 )
;(list "PDMODE" 0 ) ; new, causes a regen
(list "pickadd" 1 )
(list "pickauto" 1 )
(list "pickbox" 3 ) ; the pick box size
(list "pickdrag" 0 )
(list "pickfirst" 1 )
(list "pickstyle" 1 ) ;
(list "plinegen" 0 ) ;
(list "plinetype" 2 ) ;
(list "plinewid" 0 ) ; pline width
(list "plotrotmode" 2 ) ; needs to be 2 in order the show shadow in PS display
(list "plquiet" 0 ) ; Controls the display of optional dialog boxes and nonfatal errors for batch plotting and scripts.
;; 0 Displays plot dialog boxes and nonfatal errors
;; 1 Logs nonfatal errors and doesn't display plot-related dialog boxes
(list "PSLTSCALE" 0 ) ; new 0=do not use PS plot scale
(list "polarang" 0.392699) ; angle increments 22.5 DEG
(list "polarmode" 0 ) ; use absolute angle current UCS
(list "projmode" 1 ) ;
(list "proxygraphics" 1) ;
(list "proxynotice" 0) ; Do not notify
(list "proxyshow" 1) ;
(list "QAFLAGS" 0 )
(list "qtextmode" 0 ) ; 1=display box ILO text
(list "regenmode" 1 )
(list "savetime" 10 ) ; minutes between auto save 0=no auto save
(list "sdi" 0 )
(list "snapang" 0 )
(list "snapbase" (list 0 0)) ; hatch base point
(list "snapisopair" 0 )
(list "snapmode" 0 )
(list "snapstyl" 0 )
(list "snaptype" 0 )
(list "snapunit" (list 1 1))
(list "sortents" 96)
(list "splframe" 0 )
(list "textfill" 1 ) ; plot with text filled
(list "textqlty" 50 ) ; text resolution of TT font while plotting
(list "textsize" 5 ) ; default text size
(list "tooltips" 1 )
(list "trimmode" 1 )
(list "tstackalign" 1 )
(list "tstacksize" 70 )
(list "ucsfollow" 0 )
(list "ucsicon" 0 ) ; 0=no display 3=display icon at origin
(list "unitmode" 0 ) ; Displays fractional, feet-and-inches, and surveyor's angles as previously set
(list "worldview" 1 )
(list "visretain" 1 ) ; retain layer state
(list "xloadctl" 1 ) ; load xrefs
(list "zoomfactor" 10 )
)
); setq
(mapcar '(lambda (x)
(setvar(car x) (cadr x))
)
var)
)
)
(prompt "\nACADSet_Variables has set system variables to your preset values.")
(princ)
) ;; EOF
(ACADset_vars); this line runs the routine when it is loaded