嗨,prodromosm,
也许是这个?
注意:我假设您的dcl名为setsc1。dcl和处于有效的支持路径中
- (defun c:SETSC (/ dd dcl newsc pass)
- ;hanhphuc 07/01/2015 *happy new year*
- (if (and (setq fn (findfile [b]"[color="blue"]setsc[color="red"]1.dcl[/color][/color]"[/b])) (setq dcl (load_dialog fn))) ;_ end of and
- (progn (setq newsc (if (or (= "" (setq newsc(getvar "users1"))) (not (numberp (read newsc))))
- "10"
- newsc
- ) ;_ end of if
- ) ;_ end of setq
- (new_dialog "setsc1" dcl)
- (set_tile "newsc" newsc)
- (set_tile newsc "1")
- (mapcar ''((x) (action_tile x "(set_tile "newsc" (get_attr $key "key"))"))
- '("10" "20" "50" "100" "200" "500" "1000" "2000" "5000" "10000")
- ) ;_ end of mapcar
- (action_tile "accept" "(setq newsc (get_tile "newsc"))(done_dialog dcl)")
- (setq dd (start_dialog))
- (if (setq pass(numberp (read newsc)))
- (setvar "users1" newsc)
- ) ;_ end of if
- (set_tile "newsc" newsc)
- ) ;_ end of progn
- ) ;_ end of if
- (unload_dialog dcl)
- (if (and (/= dd 0) pass)
- (alert (strcat "\nThe new print scale is 1: " newsc))
- ;(alert "Invalid :-( ")
- ) ;_ end of if
- (princ)
- )
|