请赐教,不胜感激。
请赐教,不胜感激。看了cad帮助文件就大胆想写来试试,可是不知怎么给两个按钮分配动作来分别交替显示两幅幻灯片。
(defun c:sw ( / dcl_id )
(setq dcl_id (load_dialog "sw"))
(if (not (new_dialog "sw" dcl_id))(exit))
(setq x (dimx_tile "show tit")
y (dimy_tile "show tit"))
(start_image "show tit")
(slide_image 0 0 x y "a2")
(end_image)
(start_dialog)
(unload_dialog dcl_id)
(princ)
)
// =========show_htit.lsp===选择htit单选钮的作========
(defun show_htit ( / dcl_id )
(setq x (dimx_tile "show tit")
y (dimy_tile "show tit"))
(start_image "show tit")
(slide_image 0 0 x y "a2")
(end_image)
(start_dialog)
(unload_dialog dcl_id)
(princ)
)
// =========show_vtit.lsp===选择vtit单选钮的作=========
(defun show_vtit ( / dcl_id )
(setq x (dimx_tile "show tit")
y (dimy_tile "show tit"))
(start_image "show tit")
(slide_image 0 0 x y "b2")
(end_image)
(start_dialog)
(unload_dialog dcl_id)
(princ)
)
// =========sw.dcl=对话框================================
sw : dialog {
label = "横竖图框";
: boxed_column {
label = "图框";
: image {
key = "show tit";
height = 12;
width = 10;
color = -2;
}
: radio_row {
key = "htit_vtit";
: radio_button {
label = "横图&H";
key = "htit";
value = "1";
}
: radio_button {
label = "竖图&V";
key = "vtit" ;
value = "0";
}}
ok_cancel_help;
}
}
页:
[1]