本帖最后由 ZZXXQQ 于 2023-9-12 00:04 编辑
- (defun c:tt ()
- (if (> (setq dcl_id (load_dialog (findfile "fil.dcl"))) 0) (progn
- (if (new_dialog "fil" dcl_id "") (progn
- (showsld)
- (action_tile "fil1" "(done_dialog 1)")
- (action_tile "fil2" "(done_dialog 2)")
- (action_tile "fil3" "(done_dialog 3)")
- (action_tile "fil4" "(done_dialog 4)")
- (action_tile "fil5" "(done_dialog 5)")
- (action_tile "fil6" "(done_dialog 6)")
- (action_tile "cancel" "(done_dialog 0)")
- (setq re (start_dialog))
- )
- (princ "\n无法显示对话框!")
- )
- (unload_dialog dcl_id)
- )
- (princ "\n无法加载对话框!")
- )
- (cond
- ((= re 1) (load "d:/cad/yx_yt") (c:yx_yt))
- ((= re 2) (load "d:/cad/yx_roo") (c:yx_roo))
- ((= re 3) (load "d:/cad/yx_dfx") (c:yx_dfx))
- ((= re 4) (load "d:/cad/yx_dad") (c:yx_dad))
- ((= re 5) (load "d:/cad/yx_sg") (c:yx_sg))
- ((= re 6) (load "d:/cad/yx_4mi") (c:yx_4mi))
- )
- (princ)
- )
- ;已知DCL的fil1至fil6 对应 fil1_sld至fil6_sld
- (defun showsld ()
- (setq sldname "fil" i 1)
- (repeat 6
- (setq sldnm (strcat sldname (itoa i))
- x (dimx_tile sldnm)
- y (dimy_tile sldnm))
- (if (setq sld (findfile (strcat sldnm "_sld.sld"))) (progn
- (start_image sldnm)
- (fill_image 0 0 x y -2)
- (slide_image 0 0 x y sld)
- (end_image)
- )
- (set_tile sldnm (strcat sldnm "_sld.sld"))
- )
- (setq i (1+ i))
- )
- )
|