
- (defun initimg (image sld)
- (start_image image)
- (slide_image 0 0 (dimx_tile image) (dimy_tile image) sld)
- (end_image)
- )
- (defun dlg2 ()
- (initimg "aa" "12")
- (set_tile "n" (rtos 2 2))
- (action_tile "base1" "(getdata2) (dlg4)")
- (action_tile "accept" "(getdata2) (done_dialog 1)")
- (action_tile "cancel" "(done_dialog 0)")
- )
- (defun dlg3 ()
- (initimg "bb" "34")
- (set_tile "m" (rtos 2 2))
- (action_tile "base2" "(getdata3) (dlg4)")
- (action_tile "accept" "(getdata3) (done_dialog 1)")
- (action_tile "cancel" "(done_dialog 0)")
- )
- (defun dlg4 ()
- (if (not (new_dialog "hehe" dcl_id))
- (exit)
- )
- (set_tile "x" (rtos x 2 2))
- (set_tile "y" (rtos y 2 2))
- (action_tile "pick" "(done_dialog 2)")
- (action_tile "accept" "(getdata4) (done_dialog 3)")
- (action_tile "cancel" "(done_dialog 4)")
- (setq what (start_dialog))
- (if (= what 2)
- (done_dialog 2)
- )
- )
- (defun getdata2 ()
- (setq n (atof (get_tile "n")))
- )
- (defun getdata3 ()
- (setq m (atof (get_tile "m")))
- )
- (defun getdata4 ()
- (setq x (atof (get_tile "x")))
- (setq y (atof (get_tile "y")))
- )
- (defun c:addl (/ dcl_id tfb dclid ipos n m x y what p)
- (setq tfb '("进入" "离开"))
- (setq dclid '("haha" "heihei"))
- (setq dcl_id (load_dialog "11.dcl"))
- (if (not (new_dialog "kaka" dcl_id))
- (exit)
- )
- (start_list "list")
- (mapcar 'add_list tfb)
- (end_list)
- (set_tile "list" "0")
- (setq ipos 0)
- (action_tile "list" "(setq ipos (atoi $value))")
- (action_tile "accept" "(done_dialog 1)")
- (action_tile "cancel" "(done_dialog)")
- (if (= (start_dialog) 1) (progn
- (new_dialog (nth ipos dclid) dcl_id)
- (action_tile "accept" "(done_dialog 2)")
- (action_tile "cancel" "(done_dialog)")
- (setq x 0 y 0 m 0 n 0 p (list x y) what 3)
- (if (= ipos 0) (progn
- (while (> what 1)
- (dlg2)
- (if (= what 2) (dlg4))
- (if (/= what 2) (setq what (start_dialog)))
- (if (= what 2) (progn
- (initget 1)
- (setq p (getpoint "\nbase point:"))
- (setq x (car p) y (cadr p))
- ))
- )
- (if (= what 1) (command "insert" "进入通道块.dwg" p 1.0 1.0 0))
- ) (progn
- (while (> what 1)
- (dlg3)
- (if (= what 2) (dlg4))
- (if (/= what 2) (setq what (start_dialog)))
- (if (= what 2) (progn
- (initget 1)
- (setq p (getpoint "\nbase point:"))
- (setq x (car p) y (cadr p))
- ))
- )
- (if (= what 1) (command "insert" "离开通道块.dwg" p 1.0 1.0 0))
- ))
- ))
- )
|