- 积分
- 7560
- 明经币
- 个
- 注册时间
- 2002-9-23
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|

楼主 |
发表于 2003-7-15 18:35:00
|
显示全部楼层
經過兩天的努力,終於有了點進展.
經過兩天的努力,終於有了點進展,現在的難題是如何取得對話框的值,現在的
(defun TES ()
(setq cir_size 4.5)
(setq cir_size1 7)
(while
(setq p1 (getpoint "\nInsert point"))
(MAKECIR p1 cir_size)
(MAKECIR p1 cir_size1)
)
)
是固定了的
;;;____________________________
(DEFUN QQQ ()
(START_IMAGE "hsc")
(FILL_IMAGE 0 0 (DIMX_TILE "hsc") (DIMY_TILE "hsc") -2)
(END_IMAGE)
(START_IMAGE "hsc")
(SLIDE_IMAGE 0 0 (DIMX_TILE "hsc") (DIMY_TILE "hsc") "h_sc")
(END_IMAGE)
)
(defun QQ ()
(setq fi "pl_list")
(if (findfile (strcat fi ".dat"))
(progn
(setq fil (findfile (strcat fi ".dat")))
(setq fel (list))
(setq pe (open fil "r"))
(setq en T)
(while (/= en nil)
(progn (setq en (READ-LINE pe))
(setq fel (cons en fel))
)
)
(close pe)
(setq kic (reverse (cdr fel)))
)
)
)
(defun QQ1 ()
(setq fi "ho_list")
(if (findfile (strcat fi ".dat"))
(progn
(setq fil (findfile (strcat fi ".dat")))
(setq fel (list))
(setq pe (open fil "r"))
(setq en T)
(while (/= en nil)
(progn (setq en (READ-LINE pe))
(setq fel (cons en fel))
)
)
(close pe)
(setq kic1 (reverse (cdr fel)))
)
)
)
(defun QQ2 ()
(setq fi "sc_size")
(if (findfile (strcat fi ".dat"))
(progn
(setq fil (findfile (strcat fi ".dat")))
(setq fel (list))
(setq pe (open fil "r"))
(setq en T)
(while (/= en nil)
(progn (setq en (READ-LINE pe))
(setq fel (cons en fel))
)
)
(close pe)
(setq kic2 (reverse (cdr fel)))
)
)
)
(defun PL_LIS ()
(start_list "pl_list1" 3)
(mapcar (quote add_list) kic)
(end_list)
(start_list "pl_list2" 3)
(mapcar (quote add_list) kic)
(end_list)
(start_list "pl_list3" 3)
(mapcar (quote add_list) kic)
(end_list)
(start_list "pl_list4" 3)
(mapcar (quote add_list) kic)
(end_list)
(start_list "pl_list5" 3)
(mapcar (quote add_list) kic)
(end_list)
)
(defun HO_LIS ()
(start_list "ho_list1" 3)
(mapcar (quote add_list) kic1)
(end_list)
(start_list "ho_list2" 3)
(mapcar (quote add_list) kic1)
(end_list)
(start_list "ho_list3" 3)
(mapcar (quote add_list) kic1)
(end_list)
(start_list "ho_list4" 3)
(mapcar (quote add_list) kic1)
(end_list)
(start_list "ho_list5" 3)
(mapcar (quote add_list) kic1)
(end_list)
)
(defun SC_SIZE ()
(start_list "sc_size" 3)
(mapcar (quote add_list) kic2)
(end_list)
)
(defun MAKECIR (p1 cir_size / eli)
(setq eli (list (cons 0 "CIRCLE")
(cons 10 p1)
(cons 40 cir_size)
)
)
(entmake eli)
)
(defun TES ()
(setq cir_size 4.5)
(setq cir_size1 7)
(while
(setq p1 (getpoint "\nInsert point"))
(MAKECIR p1 cir_size)
(MAKECIR p1 cir_size1)
)
)
(defun c:h_sc ()
(QQ)
(QQ1)
(QQ2)
(setq dh (load_dialog "h_sc.dcl"))
(setq what_next 2)
(setq cnt 1)
(while (>= what_next 2)
(if (null (new_dialog "h_sc" dh))
(exit)
)
(action_tile "accept" "(done_dialog 4)")
(action_tile "cancel" "(done_dialog 0)")
(action_tile "pl_list1" "(setq pl1 $value)")
(PL_LIS)
(HO_LIS)
(SC_SIZE)
(QQQ)
(setq what_next (start_dialog))
(cond
((= what_next 4)
(TES)
)
((= what_next 0)
(prompt "\n***EXIT***")
)
)
)
(unload_dialog dh)
(princ)
)
;;;___________________________________
;(setq pl1oi (atoi pl1))
;(if (/= pl1oi nil)
;(setq pl1o (- 1 pl1oi))
;)
;(setq pl1_kic(nth pl1o kic))
;;;_______________________________________
h_sc:dialog{label="h_sc";
:row{
:text{label="螺絲大小";}
:popup_list{key="sc_size";fixed_width=true;}
:text{label="螺絲長度";}
:popup_list{list="40";fixed_width=true;}
}
:text{}
:row{
: column {
:row{
: column {
:text{label= "加工模板";}
:popup_list{key="pl_list1";width=25;is_default=true;}
:popup_list{key="pl_list2";width=25;is_default=true;}
:popup_list{key="pl_list3";width=25;is_default=true;}
:popup_list{key="pl_list4";width=25;is_default=true;}
:popup_list{key="pl_list5";width=25;is_default=true;}
}
: column {
:text{label= "加工孔類型";}
:popup_list{key="ho_list1";width=25;is_default=true;}
:popup_list{key="ho_list2";width=25;is_default=true;}
:popup_list{key="ho_list3";width=25;is_default=true;}
:popup_list{key="ho_list4";width=25;is_default=true;}
:popup_list{key="ho_list5";width=25;is_default=true;}
}
: column {
:text{label= "加工孔大小";}
:edit_box{key="ho_size1";width=20;is_default=true;}
:edit_box{key="ho_size2";width=20;is_default=true;}
:edit_box{key="ho_size3";width=20;is_default=true;}
:edit_box{key="ho_size4";width=20;is_default=true;}
:edit_box{key="ho_size5";width=20;is_default=true;}
}
}
}
:image {key="hsc";height = 10;width = 30;color = -2;}
}
:text{}
ok_cancel;
}
;;;_____________________________
頭部通孔
頭部沉頭孔
通孔
螺紋孔
;;;______________________________
M2
M3
M4
M5
M6
M8
M10
M12
M14
M16
M18
M20
|
|