本帖最后由 zhynt 于 2011-7-28 08:49 编辑

- (defun c:err()
- (setq st 0);设置状态参数sdt为O
- (setq id (load_dialog "f:\\自编带对话框程序\\err.dcl"))
- (if (< id 0) (exit));如果装入失败则退出
- (if (not (new_dialog "err" id)) (exit));显示名字为err的对话框,如果失败则退出
- ;;;增加这一句:
- (action_tile "e_handle" "(getstr) (done_dialog 1)")
- (action_tile "accept" "(getstr) (done_dialog 1)");定义OK按钮的活动,然后以1为状态值关闭对话框
- (action_tile "cancel" "(done_dialog -1)");定义Cancel按钮的活动是以-1为状态值关闭对话框
- (setq st (start_dialog)):显示对话框,将得到关闭对话框时的状态值
- (unload_dialog id);卸载对话框文件
- (setq ob_ename (handent handle_ID))
- (setq ge_lst1 (assoc 10 (entget ob_ename)))
- (setq start_p (list (cadr ge_lst1) (caddr ge_lst1)))
- (command "line" start_p)
- )
|