Ok, since the "quality" of the code was called into question.... I have taken the liberty of condensing it a bit....
LISP Code
(defun c:zg ()
(setq zdialog (load_dialog "zoomscale"))
(if (and zdialog (new_dialog "zp" zdialog))
(progn
(action_tile "zoom" "(setq zoomfactor (atoi $value))")
(if (>(start_dialog) 0)
(command ".zoom" (nth zoomfactor (list "1/1536xp" "1/768xp" "1/384xp" "1/192xp" "1/128xp" "1/96xp"
"1/64xp" "1/48xp" "1/32xp" "1/24xp" "1/16xp" "1/12xp" "1/4xp"
"1/2xp" "e" "p" "a" "v" ".9x" "2x" ".5")))
)
) ;_ progn
) ;_ if
)
DCL Code
zp : dialog {
label = "Zoom scale";
: boxed_column {
label = "zoom ps";
: list_box {
allow_accept = true;
key = "zoom";
list = "1/128\"=1'-0\"\n1/64\"=1'-0\"\n1/32\"=1'-0\"\n1/16\"=1'-0\"\n3/32\"=1'-0\"\n1/8\"=1'-0\"\n3/16\"=1'-0\"\n1/4\"=1'-0\"\n3/8\"=1'-0\"\n1/2\"=1'-0\"\n3/4\"=1'-0\"\n1\"=1'-0\"\n3\"=1'-0\"\n6\"=1'-0\"\nExtents\nPrevious\nAll\nVmax\n.9x\n2x\n.5x";
width = 5;
}
}
ok_cancel;
}
In an effort to correctly design a program you would need to let us know exactly how you want to setup your drawings. I am confused as are probably many of the others here as to what exactly you are looking for.
This code in itself is probably not the best way to handle multiple settings. The dialog would work ok, but the number of system variables you want to change would make a big difference.
For example in the above code, if you only wanted to change one setting, you could change the line where it calls the zoom command to one that sets the variable you want changed, adjust the list to the settings you require for each of your scale factors.
If you were to use multiple variables and want to change them all, a much easier way to handle it would be the mapcar function...
i.e.
(mapcar 'setvar '(variable name list) '(variable argument list))
The length of the name list and argument list must be the same