麻烦帮忙看下这个对话框的控制参数怎么执行不了?
子程序单独运行都没问题,但是一调用对话框就死机了,cad重启N次还是不行
(defun c:nice_frame ()
(setq dcl_id (load_dialog "nice_frame.dcl"))
(new_dialog "nice_frame" dcl_id)
;动作参数
(action_tile "nice_dcl_insertframe" "(nice_insertframe) (done_dialog)")
(action_tile "nice_dcl_insertdirectory" "(nice_insertdirectory) (done_dialog)")
(action_tile "nice_dcl_insertfram_modify" "(nice_insertfram_modify) (done_dialog)")
(action_tile "nice_dcl_makediractory" "(nice_makediractory) (done_dialog)")
(action_tile "cancel" "(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
)这个是函数主程序的对话框相关的东东nice_frame:dialog {
label = "图框目录 v1.0 2015.8.1 by【九群】";
:boxed_row {
:boxed_column {
width = 8;
fixed_width = true;
label = "图框";
:button {
key = "nice_dcl_insertframe";
label = "插入图框";
width = 8;
}
:button {
key = "nice_dcl_insertfram_modify";
label = "插入改图框";
width = 8;
}
}
:boxed_column {
label = "目录";
:button {
key = "nice_dcl_insertdirectory";
label = "空白目录";
width = 8;
}
:button {
key = "nice_dcl_makediractory";
label = "填写目录";
width = 8;
}
}
}
cancel_button ;
}
这个是对话框的定义文件,奇了怪了
没有问题啊 zkq1212 发表于 2015-8-1 08:44:31 static/image/common/back.gif
没有问题啊
我也是看不出问题来,奇怪了 调用了没问题啊 所有 label = "空白目录"; 要改成label = \"空白目录\"; (defun c:nice_frame()
(setq dcl_id (load_dialog (nicek)))
(new_dialog "nice_frame" dcl_id)
;动作参数
(action_tile "nice_dcl_insertframe" "(nice_insertframe) (done_dialog)")
(action_tile "nice_dcl_insertdirectory" "(nice_insertdirectory) (done_dialog)")
(action_tile "nice_dcl_insertfram_modify" "(nice_insertfram_modify) (done_dialog)")
(action_tile "nice_dcl_makediractory" "(nice_makediractory) (done_dialog)")
(action_tile "cancel" "(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
)
(defun nicek(/ lst_str str file f)
(setq lst_str '(
"nice_frame:dialog { "
" label = \"图框目录\";"
" :boxed_row { "
" :boxed_column { "
" width = 8;"
" fixed_width = true;"
" label = \"图框\";"
" :button { "
" key = \"nice_dcl_insertframe\";"
" label = \"插入图框\";"
" width = 8;"
" }"
" :button { "
" key = \"nice_dcl_insertfram_modify\";"
" label = \"插入改图框\";"
" width = 8;"
" }"
" }"
" :boxed_column { "
" label = \"目录\";"
" :button { "
" key = \"nice_dcl_insertdirectory\";"
" label = \"空白目录\";"
" width = 8;"
" }"
" :button { "
" key = \"nice_dcl_makediractory\";"
" label = \"填写目录\";"
" width = 8;"
" }"
" }"
" }"
" cancel_button ; "
" }"
)
)
(setq file (vl-filename-mktemp "DclTemp.dcl"))
(setq f (open file "w"))
(foreach str lst_str
(princ "\n" f)
(princ str f)
)
(close f)
;;返回
file
)
;;;=================================================================*
(princ)
页:
[1]