明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1094|回复: 1

各位老师来帮我看看这个问题怎么处理~~困惑我好久了

[复制链接]
发表于 2005-5-18 18:39:00 | 显示全部楼层 |阅读模式
如何点击ADD按钮后将写入的新词加入到列表中去,程序我粘在这里,大家看看到底怎样修改。 lisp程序 ***************************** (defun c:dia003()
(setvar "cmdecho" 0) (setq word_list (list "Plan" "Solid" "Manager-room" "Stair-room" "Spring" "Screw" "Fax" "Infomation" "Technologe-center" "Special-training" "Road" "Bridge" "Shortcut-system" "High-railway" "Blank"))
(setq pophh_list '("5" "10" "20" "30" "40" "50"))
(setq popang_list '("0" "30" "45" "60" "75" "90" "-30" "-45" "-60")) (dcl_dia003)
(prin1)
)
;**************************************************************************************
(defun dcl_dia003()
(setq dcl_id (load_dialog "C:\\Windows\\Desktop\\NEWDRAWING\\lisp\\dia003"))
(new_dialog "dia003" dcl_id)
(show_list "klist" word_list)
(show_list "pophh" pophh_list)
(show_list "popang" popang_list)
(set_tile "klist" "8")
(sub_klist "8")
(set_tile "texthh" "10")
(set_tile "textang" "0")
(action_tile "add_ok" "(ok_add)")
(action_tile "klist" "(sub_klist $value)")
(action_tile "pophh" "(sub_pophh $value)")
(action_tile "popang" "(sub_popang $value)")
(action_tile "accept" "(ok_dia003)(done_dialog 1)")
(setq dd(start_dialog))
(if (= dd 1)
(progn
(setvar "cmdecho" 1)
(command "text" pause texthh textang wordsto)
(setvar "cmdecho" 0)
)
)
)
;**************************************************************first sub_program
(defun show_list(key newlist)
(start_list key)
(mapcar 'add_list newlist)
(end_list)
)
;*************************************************************second sub_program****************************************
(defun sub_klist(vvs)
(set_tile "wordsto"(nth (atoi vvs) word_list))
)
;*************************************************************third sub_program******************************
(defun sub_pophh(vvs)
(set_tile "texthh" (nth (atoi vvs) pophh_list))
)
;*************************************************************fourth sub_program***************************
(defun sub_popang(vvs)
(set_tile "textang" (nth (atoi vvs) popang_list))
)
;*************************************************************fifth sub_program*************************
(defun ok_dia003()
(setq wordsto(get_tile "wordsto"))
(setq texthh(get_tile "texthh"))
(setq textang(get_tile "textang"))
)
;********************************************************************************************
(defun ok_add()
(setq addword (get_tile "addword"))
(setq new_list(cons addword word_list))
(show_list "klist" new_list)
)
;*************************************************************************** dcl程序 dia003:dialog{
label="WORD-STOCK";
:list_box{
label="Common Word-Stock Selection";
key="klist";
width=30;
height=10;
fixed_width_font=true;
}
:row{
fixed_width=true;
:button{
label="add";
kay="add_ok";
width=12;
}
:edit_box{
label="";
key="addword";
edit_width=20;
}
}
:edit_box{
label="Word-Stock";
key="wordsto";
}
:row{
fixed_width=true;
alignment=centered;
:edit_box{
label="Textheight";key="texthh";edit_width=4;}
:popup_list{
key="pophh";edit_width=4;}
:edit_box{
label="Textangle";key="textang";edit_width=4;}
:popup_list{
key="popang";edit_width=4;
}
}
spacer_1;
ok_cancel;
}

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2005-5-20 18:21:00 | 显示全部楼层
还是自己解决了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-17 08:20 , Processed in 0.186500 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表