明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2119|回复: 2

请问版主如何在对话框取得返回值并将它显示在前面相应的编辑框中?

[复制链接]
发表于 2004-6-15 15:31:00 | 显示全部楼层 |阅读模式
感谢版主上次的指教,现在点击"浏览"按钮已经没问题了,但它的返回值却得不到,请问如何取得返回值并将它显示在前面相应的编辑框中?谢谢! defun c:qx ()
(setq dcl_id (load_dialog "qx6.dcl"))
(if (not (new_dialog "qx6" dcl_id)) (exit))
(set_tile "fi" "")
(set_tile "zh" "0")
(set_tile "zhju" "200")
(set_tile "fi2" "SEGMENT")
(mode_tile "fi" 2)
(action_tile "accept" "(ok)")

(action_tile "filein" "(getf)") ; 注意 执行的操作在引号中
(action_tile "fileout" "(outf)")

(start_dialog )
(done_dialog)
(unload_dialog dcl_id)
) (defun getf ()
(getfiled "请选择转点文件" "" "" 10)
) (defun outf ()
(getfiled "请输入计算成果文件名" "" "lsp" 5)
) (defun ok ( )
(setq fi (get_tile "fi")) ;手工输入的数据文件名
(setq zh (atof (get_tile "zh")))
(setq zhju (atof (get_tile "zhju")))
(setq fi2 (get_tile "fi2")) ;;手工输入的数据文件名
(setq filein (get_tile "filein")) ;点击"浏览"菜单得到的文件名 (setq fileout (get_tile "filein")) ;点击"浏览"菜单得到的文件名
(done_dialog)
) ======以下是dcl ================== qx6:dialog{
label = "圆曲线元素计算";
:row {
:edit_box{
label = "转点文件名";
mneonic = "N";
key = "fi";
edit_width =10;
}
:button{
label = "浏览";
key = "filein";
width = 1;
height = 1;
mnemonic= "B";
}
}
:edit_box{
label = "起始点桩号";
mneonic = "N";
key = "zh";
edit_width =20;
}
:edit_box{
label = "桩 距";
mneonic = "N";
key = "zhju";
edit_width =20;
}
:row {
:edit_box{
label = "成果文件名";
key = "fi2";
edit_width =10;
}
:button{
label = "浏览";
key = "fileout";
width = 1;
height = 1;
mnemonic= "B";
}
} spacer_1;
ok_cancel_err;
}
;=======真是每一步都很难======== ;谢谢!
发表于 2004-6-15 16:02:00 | 显示全部楼层

回复

(defun getf ( / strFile)
(setq strFile (getfiled "请选择转点文件" "" "" 10))
(set_tile "fi" strFile)
)

本帖子中包含更多资源

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

x
 楼主| 发表于 2004-6-16 14:48:00 | 显示全部楼层
多谢指教!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-29 00:42 , Processed in 0.160199 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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