本帖最后由 mmh1 于 2011-12-26 20:31 编辑
- (defun c:dia7b()
- (setvar "cmdecho" 0)
- (setq word_list '("平面图" "立体图" "总经理室" "楼梯阁" "弹簧" "传真机" "教育中心" "规格表"))
- (chk_style)
- (dcl_dia7b)
- (prompt "<<dia7b>>框设计......连续选")
- )
- (defun dcl_dia7b()
- (setq dcl_id (load_dialog "dia7b"))
- (new_dialog "dia7b" dcl_id)
- (show_list "klist" word_list)
- (action_tile "klist" "(sub_klist1 $value)")
- (action_tile "accept" "(ok_dia7b)(done_dialog 1)")
- (setq dd (start_dialog))
- (if (= dd 1)
- (progn
- (setvar "cmdecho" 1)
- (command "text" pause pause 0 wordstr)
- (setvar "cmdecho" 0)
- )
- )
- )
- (defun show_list(key newlist)
- (start_list key)
- (mapcar 'add_list newlist)
- (end_list)
- )
- (defun sub_klist1(vvs)
- (setq oldstr (get_tile "wordstr"))
- (setq newstr (nth (atoi vvs) word_list))
- (set_tile "wordstr" (strcat oldstr newstr))
- )
- (defun ok_dia7b()
- (setq wordstr(strcase (get_tile "wordstr")))
- )
- (defun chk_style()
- (setq chksty (tblsearch "style" "kk"))
- (if (null chksty)
- (command "_style" "kk" "黑体" "" "" "" "" "" "")
- )
- (if (null chklay)
- (command "_layer" "m" "txt" "c" "3" "txt" "")
- )
- (setvar "clayer" "txt")
- (setvar "textstyle" "kk")
- )
找到答案了,这样就可以了 |