明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1747|回复: 3

斑竹,请问在AutoLisp里可以实现TEXTCHANGE事件吗?

[复制链接]
发表于 2004-6-2 10:25:00 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2004-6-2 11:47:15 编辑

我想实现这样的一个功能:在我选择了第一个POPUE_LIST中的第一项,那么就在第四个POPUP_LIST的内容中增加一项“1”,选取了第二项就在第四个POPUP_LIST中增加“2”,......,但就不能实现。请问这是为什么?不好意思,我是只菜鸟。 (defun C:PN() (setq cc (load_dialog "partno.dcl"))
(if (not (new_dialog "nn" cc)) (exit))
(action_tile "c1" "(group-index)")
(start_dialog)
)
(defun group-index()
(setq c1-value (get_tile "c1"))
(cond (c1-value 0)
(progn
(start_list "c4")
(add_list "1")
(end_list )
) (c1-value 1) (progn (start_list "c4")
(add_list "2")
(end_list )
)
)
(start_dialog)
)
DCL如下(nn.dcl): nn:dialog
{label="Part No. information";
:row
{label="Please select item";
:row
{label="Group Index";
width=25;
:popup_list
{
key="c1";
list="E--Electronic \n N--Electrical & Mechanical \n M--Metal \n P--Plastic \n K--Packaging \n H--Other";
value="0";
}
} :row
{label="Nature Index";
width=25;
:popup_list
{
key="c2";
list="S--Standardized Material\n F--Functioning Material\n T--Tailor-made Material";
value="0";
}
}
:row
{label="C3";
width=25;
:popup_list
{
key="c3";
list="Accessory \n Adaptor \n Bearing \n Brand label \n Chemical Material \n Clock \n Conducting Parts \n Connector \n Decorative Cut Sheet \n Dowel";
value="0";
}
}
:row
{label="C4";
width=25;
:popup_list
{
key="c4";
value="0";
}
} }
:text_part
{key=display_text;
}
ok_only;
}
发表于 2004-6-2 10:38:00 | 显示全部楼层
You should load the DCL file first.
发表于 2004-6-2 12:43:00 | 显示全部楼层
(defun C:PN ()
(setq ID (load_dialog "nn"))
(if (not (new_dialog "nn" ID))
(exit)
)
(action_tile "c1" "(group-index)")
(start_dialog)
)
(defun GROUP-INDEX ()
(setq C1-VALUE (get_tile "c1"))
(cond ((= C1-VALUE "0")
(start_list "c4" 1 0)
(add_list "1")
(end_list)
(set_tile "c4" "0")
)
((= C1-VALUE "1")
(start_list "c4" 1 1)
(add_list "2")
(end_list)
(set_tile "c4" "1")
)
)
)
 楼主| 发表于 2004-6-4 13:38:00 | 显示全部楼层
谢谢斑竹!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-28 08:45 , Processed in 0.164381 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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