well, everything i am setting should apply to every drawing, therefore I'd like to set as much as possible PER SESSION, as long as that won't get overwritten by a template setting or something subsequent to initial open.
here is my code... for acad.lsp and it didn't work grid mode is still 1, osnapz is still 0, etc.... no errors though
; load system settings, vba, arx files
;(arxload "arxfile.arx")
(defun setvars (/ lst x ds)
(and (zerop (setq ds (getvar 'dimscale))) (setq ds 1))
(setq lst '((acadlspasdoc . 1)
(blipmode . 0)
(cecolor . "bylayer")
(celtype . "bylayer")
(cmddia . 1)
(startup . 1)
(isavepercent . 0)
(tooltips . 0)
(xrefnotify . 2)
(xloadctl . 2)
(visretain . 1)
(regenmode . 1)
(attmode . 1)
(attreq . 1)
(backgroundplot . 0)
(cmljust . 1)
(demandload . 3)
(draworderctl . 3)
(elevation . 0)
(fielddisplay . 1)
(fieldeval . 31)
(gridmode . 0)
(ucsvp . 0)
(xreftype . 1)
(geomarkervisibility . 0)
(tooltips . 1)
(indexctl . 3)
(expert . 5)
(rollovertips . 0)
(publishcollate . 0)
(ssmautoopen . 0)
(osnapz . 1)
(mirrtext . 0)
(proxygraphics . 0)
(insunitsdefsource . 2)
(insunitsdeftarget . 2)
(maxsort . 10000)
(isavebak . 1)
(isavepercent . 1)
(offsetgaptype . 0)
(savefidelity . 0)
(plinegen . 0)
(plinewid . 0)
(polysides . 3)
(ucsfollow . 0)
(rasterthreshold . 100)
(rasterpercent . 90)
(elevation . 0)
(imageframe . 2)
(geomarkervisibility . 0)
(navvcubedisplay . 0)
(navbardisplay . 0)
(lwdisplay . off)
(gridmode . 0)
(lwunites . 0)
(orthomode . 0)
(layoutregenctl . 0)
(hpglmode . 1)
(layerdlgmode . 0)
)
)
(foreach x lst (vl-catch-all-apply 'setvar (list (car x) (eval (cdr x)))))
(princ) /[code]