本帖最后由 作者 于 2009-5-11 14:47:25 编辑
YC.DCL - test:dialog {
- label=" 批量修改文件 ";
- :row {
- :button {
- fixed_width = true ;
- label = "目录" ;
- width = 10 ;
- key = "Sel" ;
- }
- }
- ok_cancel;
- }
YC.LSP - (defun c:YC()
- ;;load dcl file
- (if (>(setq index-value (load_dialog "YC")) 0);装载DCL文件
- (progn ;大于0 正确
- (if (new_dialog "test" index-value);显示对话框
- (progn
- (start_dialog);;激活
- (mode_tile "Sel" 2)
- (action_tile "Sel" "(drawline)")
-
- ); end progn
- (alert " 不能显示对话框")
- );end if
- );end progn
- (alert "不能装载")
- );end if load
- (princ)
- );end defun
- (defun drawline()
- (setq p1 (list 0 0 ) p2 (list 10 10 ))
- (command "line" p1 p2 "")
- )
不知为何,就是不画线。点按钮没有任何反应!

(start_dialog);;激活
应靠后放
|