(defun FUCTION() (setq numLay(get_tile "lst1")) (if (/= numLay "") (progn (setq ItemLay(atoi numLay)) (setq layName(nth ItemLay LstLay)) ) (progn (setq ItemLay -1) (setq layName nil) ) ) (setq numCol(get_tile "pop1")) (if (= numCol "") (setq ItemCol nil) (setq ItemCol (nth (atoi numCol) LstCol)) ) (setq edt1(get_tile "edt1")) (setq edt2(get_tile "edt2")) (setq edt3(get_tile "edt3")) ) (defun a() (if (= a 1) (progn (mode_tile "edt1" 1) (mode_tile "edt2" 0) (mode_tile "edt3" 1) ) (progn (if (= a 2) (progn (mode_tile "edt1" 0) (mode_tile "edt2" 0) (mode_tile "edt3" 1) ) (progn (mode_tile "edt1" 1) (mode_tile "edt2" 0) (mode_tile "edt3" 0) ) ) ) ) ) (Defun c:example() (setq dcl_id(load_dialog "example.dcl")) (if (not (new_dialog "example" dcl_id)) (progn (alert "The Example.dcl khong duoc loaded..! ") (exit) ) ) ;; khai bao cac bien trong list_box va popup_list (setq LstLay(list "1" "TEXT" "DIM" "CAODO" "DIEM" "POINT")) (setq LstCol(list "1" "2" "3" "8" "255")) ;; gan cac khai bao cho bien (start_list "lst1" 3) (mapcar 'add_list lstLay) (end_list) (start_list "pop1" 3) (mapcar 'add_list lstCol) (end_list) (action_tile "ch1" "(a 1)") (action_tile "ch2" "(a 2)") (action_tile "ch3" "(a 3)") (action_tile "cancel" "(setq ddiag 1)(done_dialog)") (action_tile "accpet" "(setq ddiag 2)(FUCTION)(done_dialog)") (start_dialog) (unload_dialog dcl_id) (if (= ddiag 1) (progn (exit) (princ "exit: ") ) ) (if (= ddiag 2) (progn (command "-layer" "make" layName "c" itemcol "" "") (command "clayer" layName);; o day minh moi thu tao layer voi ten cua layer lay tu list_box va mau lay tu popup_box nhung khong co duoc nen minh khong tiep duoc ) ) )