本帖最后由 作者 于 2010-2-4 20:08:23 编辑
对话框和屏幕操作交换是在未退出当前程序中实现切换的,所以将相关的数据储存在局部变量即可 下面的是对话框驱动的大概原理,希望对你有用 (defun c:tt (/ ID FLAG BoxVal ...) (setq ID (load_dialog "DclFileName")) (while (and (not (member FLAG '(0 1))) (new_dialog "XXXX" ID);;循环执行,直到用户点accept或cancel按钮则中断循环 ) (or BoxVal (set_tile "key_editbox" BoxVal));;假如局部变量BoxVal存在 ★ (action_tile "key_editbox" "(setq BoxVal $value)");;此控件是个编辑框。及时将数据赋予变量BoxVal (action_tile "getdate" "(done_dialog 2)");此控件是个屏幕拾取按钮 (action_tile "cancel" "(done_dialog 0)") (action_tile "accept" "(done_dialog 1)")
(setq FLAG (start_dialog)) (cond ((= FLAG 2) (if (setq DD (getdist "xxxxxxx")) (setq BoxVal (rtos DD 2 2))));;将拾取的数据赋值给BoxVal,以便再次显示对话框的时候——★处更新 .... .... );end cond );end_while (unload_dialog ID) ) |