- UID
- 444140
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2006-5-25
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
;主程序
(defun c:amzhu ()
(setvar "cmdecho" 0)
(dcl_zhu)
(prin1)
)
;调用主对话框
(defun dcl_zhu ()
(setq dcl_num (load_dialog "cad/xiu"))
(new_dialog "xiu" dcl_num)
(setq x (dimx_tile "zhusld"))
(setq y (dimy_tile "zhusld"))
(start_image "zhusld")
(fill_image 0 0 x y -2)
(slide_image 0 0 x y "lundui")
(end_image)
(action_tile "canshu" "(amxiug)(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(start_dialog) ;
)
;数据修改主程序
(defun amxiug ()
(dcl_fzhu)
(gc)
(prin1)
)
;调用修改主对话框
(defun dcl_fzhu ()
(setq dcl_num111 (load_dialog "cad/xiugai"))
(new_dialog "xiugai" dcl_num111)
(action_tile "zhoud_list" "(fxiugai $value)")
(action_tile "jiaru" "(fzhou)")
(action_tile "accept" "(dcl_data)(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq dq (start_dialog))
)
;数据修改参数列表及显示对话框
(defun dcl_data ()
(setq dcl_n (load_dialog "cad/xiugai1"))
(new_dialog "xiugai1" dcl_n)
(action_tile "xiugai_list" "(fxiugai1 $value)")
(action_tile "zjshu" "(show_list xiuga_list)")
(action_tile "xuanzhe_list" "(dcl_xiu $value)")
(action_tile "yxuanzhe" "(show2_list gai1_list)")
(action_tile "kxiugai" "(done_dialog 1)")
(action_tile "back" "(done_dialog 1) (dcl_fzhu)")
(action_tile "cancel" "(done_dialog 0) ")
(setq dt (start_dialog))
)
;显示轴段列表框的内容
(defun show1_list (list1)
(start_list "zhoud_list" 3)
(mapcar 'add_list list1)
(end_list)
)
;显示修改列表框的内容
(defun show_list (list2)
(start_list "xiugai_list" 3)
(mapcar 'add_list list2)
(end_list)
)
;显示已选择修改参数列表框的内容
(defun show2_list (list3)
(start_list "xuanzhe_list" 3)
(mapcar 'add_list list3)
(end_list)
)
;调入数据并显示数据特征表
(defun fzhou ()
(setq shuju
'(("制动盘座"
("圆柱段特征"
("直径" 202.0 0.036 0.015)
("长度" 160.0 0.0 0.0)
("形状" ("zdj" 0.0 0.0) ("ydy" 0.0 0.0))
("表面粗糙度"
("zhumian" 1.6)
("duanmian" 6.3)
("zdj" 3.2)
("ydy" 3.2)
)
("形状公差" ("圆柱度" 0.05) ("圆度" 0.018))
("位置公差"
("圆跳度" 0.02 (2.0 "左轴颈" "右轴颈") "duanmian")
("同轴度" 0.02 "fai" (2.0 "左轴颈" "右轴颈") "zhumian")
)
)
)
("左轴颈"
("圆柱段特征"
("基准轴" ("轴中心线" "A"))
("直径" 120 0.059 0.037)
("长度" 191 0.5 0)
("形状"
("zdj" ("x" 10 0 0.2) 1)
("aocao"
("r1" 35 ("x" 25 2.0 0))
("r2" 20 10 ("y" 0.2 0 0.2) 5)
)
)
("表面粗糙度"
("duanmian" 6.3)
("zdj" 3.2)
("zhumian" 1.6)
("aocao1" 1.6)
("aocao2" 2.5)
)
("形状公差" ("圆柱度" 0.01 "yz") ("圆度" 0.006))
)
1
)
("左防尘板座"
("圆柱段特征"
("直径" 145.0 0.015 0.011)
("长度" 64 0 0)
("形状" ("zdj" 3 3) ("ydy" "j" 30))
("表面粗糙度"
("duanmian" 3.2)
("zhumian" 1.6)
("ydy1" 1.6)
("ydy2" 2.5)
)
("位置公差"
("圆跳度" 0.02 (2 "左轴颈" "右轴颈") "duanmian")
)
("定位点")
)
2
)
("左轮座"
("圆柱段特征"
("直径" 178 1.0 2.0)
("长度" 198 0 0)
("形状" ("zdj" ("x" 12 4.0 0) 0.5) (0))
("表面粗糙度" ("zdj" 3.2) ("zhumian" 1.6))
("形状公差"
("直线度" 0.015)
("圆柱度" 0.05 "yz")
("圆度" 0.018)
)
("位置公差"
("同轴度" 0.015 "fai" (2 "左轴颈" "右轴颈") "zhumian")
)
)
3
)
("轴身"
("圆柱段特征"
("直径" 158 2.0 0.0)
("长度" 1204 0 0)
("形状" ("zdy" "j" 75) ("ydy" "j" 75))
("表面粗糙度" ("zdy" 6.3) ("zhumian" 6.3))
)
4
)
("右轮座"
("圆柱段特征"
("直径" 178 1 -2)
("长度" 198 0 0)
("形状" ("ydj" ("x" 10 0 -2) 0.5) (0))
("表面粗糙度" ("ydj" 3.2) ("zhumian" 1.6))
("形状公差"
("直线度" 0.015)
("圆柱度" 0.05 "zz")
("圆度" 0.018)
)
("位置公差"
("同轴度" 0.015 "fai" (2 "左轴颈" "右轴颈") "zhumian")
)
)
5
)
("右防尘板座"
("圆柱段特征"
("直径" 145.0 0.2 0.12)
("长度" 64 0 0)
("形状" ("ydj" 5.0 5.0) ("zdy" "j" 25.0))
("表面粗糙度" 1.6)
("位置公差" ("圆跳度" 0.02 (1 "左轴颈") "duanmian"))
)
6
)
("右轴颈"
("圆柱段特征"
("基准轴" ("轴中心线" "B"))
("直径" 120 0.068 0.043)
("长度" 191 0.5 0)
("形状"
("ydj" ("x" 10 0 0.2) 1 "圆滑过渡")
("aocao"
("r1" 35 ("x" 25 2.0 0))
("r2" 20 10 ("y" 0.2 0 0.2) 5)
)
)
("表面粗糙度"
("duanmian" 6.3)
("ydj" 3.2)
("zhumian" 1.6)
("aocao" 1.6)
)
("形状公差" ("圆柱度" 0.01 "yz") ("圆度" 0.006))
)
7
)
("总体"
("精度特征"
("L1" 0.5 0)
("L2" 0.5 0.5)
("LX" 1.0 0)
("基准" (2 "左轴颈" "右轴颈"))
("中心孔" ("数量" 2) ("型号" "B10") ("国标号" "GB145-85"))
)
8
)
("端面"
("辅特征"
("螺纹孔"
("公称直径" 22)
("螺距" 2)
("螺孔深" 45 2.0 0)
("钻孔深" 60 5.0 0)
("倒角" 23 120)
("数量" 3)
("定位圆" 85)
("精度等级" "6H")
("分布形式" "均布")
)
("中心孔"
("阶梯锥"
("圆锥" 28 21 ("x" 2 0.2 0) 120)
("角度" 60 "max")
("总长" 25 2.0 0)
("圆柱" 10)
)
)
("位置公差"
("位置度" 0.2 "fai" (1 "左轴颈") "lwkzhongxin")
("平行度" 0.2 "fai" (1 "左轴颈") "lwkzhongxin")
)
)
9
)
("轴型及辅助信息"
("附加条件"
("轴型" "RC3型车轴")
("重量" "315")
("材料" "LZ")
("比例" "1:10")
("其余表面粗糙度" 6.3)
)
10
)
)
) ;在这里数据表直接加入内存,但是断点显示shuju=nil
(setq n 0
n0 (- (length shuju) 1)
zhou_list '()
)
(while (<= n n0)
(setq data (car (nth n shuju)))
(setq zhou_list (cons data zhou_list))
(setq n (+ n 1))
)
(setq zhou_list (reverse zhou_list))
(setq kc 0)
(show1_list zhou_list)
) ;xingzh
;取特征列表中的数据
(defun fxiugai (vs)
(setq knum (atoi vs))
;(if (= kc 1);ru zenjia zhouduan
;(setq kspring (nth knum xiug_list))
(setq kspring (nth knum zhou_list))
(set_tile "knew1" kspring)
(setq js2 (cadr (assoc kspring shuju)))
(setq tezhen (car js2))
(setq n0 (- (length (cdr js2)) 1))
(setq n 0)
(setq xiuga_list '())
(while (<= n n0)
(setq xiuga_list (cons (car (nth n (cdr js2))) xiuga_list))
(setq n (+ n 1))
)
(setq xiuga_list (reverse xiuga_list))
(setq kc 0)
;(show_list xiuga_list)
)
;取列表框中的数据,可多选择
(defun fxiugai1 (vs)
(setq count 1)
(setq xiu (cdr js2))
(setq gai1_list '())
(while (setq item (read vs))
(setq gai1_list (cons (nth item xiuga_list) gai1_list))
(while (and (/= "" (substr vs count 1))
(/= " " (substr vs count 1))
)
(setq count (+ count 1))
)
(setq vs (substr vs count))
)
(setq gai1_list (reverse gai1_list))
)
;取一个已选择数据,并调用修改对话框
(defun dcl_xiu (vs)
(setq knum (atoi vs))
(setq gai (nth knum gai1_list))
(if (= gai "位置公差")
(shujunew2)
)
(if (or (= gai "直径") (= gai "长度"))
(shujunew33)
)
(if (= gai "形状公差")
(shujunew33)
)
(if (= gai "形状")
(progn
(setq xzh
(car
(nth 0
(cdr (assoc gai (cdr (cadr (assoc kspring shuju)))))
)
)
)
(setq xzh1
(car
(nth 1
(cdr (assoc gai (cdr (cadr (assoc kspring shuju)))))
)
)
)
(setq js6
(nth 0 (cdr (assoc gai (cdr (cadr (assoc kspring shuju))))))
)
(cond ((and (or (= xzh "zdj") (= xzh "ydj"))
(and (/= xzh1 "zdy") (/= xzh1 "ydy"))
)
(progn
(if (listp (cadr js6))
(shujunew4)
(shujunew1)
)
)
)
((and (or (= xzh "zdj") (= xzh "ydj"))
(or (= xzh1 "zdy") (= xzh1 "ydy"))
)
(progn
(if (listp (cadr js6))
(shujunew6)
(shujunew33)
)
)
)
((and (or (= xzh1 "zdy") (= xzh1 "ydy"))
(or (= xzh "zdy") (= xzh "ydy"))
)
(daoyuangai)
)
((or (= xzh1 "zdy") (= xzh1 "ydy"))
(xiudaoyuan)
)
)
)
)
(if (= gai "表面粗糙度")
(shujunew5)
)
)
;修改并保存数据函数
(defun saveshuj ()
(setq dcl_save (load_dialog "saveshu"))
(new_dialog "saveshu" dcl_save)
(action_tile "save1" "(xiugaishu gai)(done_dialog 0)")
(action_tile "cancel" "(done_dialog 0)")
(setq da (start_dialog))
)
;数据修改函数
(defun xiugaishu (gai)
(xiuga2 gai kspring)
)
;数据修改子函数
(defun xiuga2 (gaix kspring)
(setq shuju
'(("制动盘座"
("圆柱段特征"
("直径" 202.0 0.036 0.015)
("长度" 160.0 0.0 0.0)
("形状" ("zdj" 0.0 0.0) ("ydy" 0.0 0.0))
("表面粗糙度"
("zhumian" 1.6)
("duanmian" 6.3)
("zdj" 3.2)
("ydy" 3.2)
)
("形状公差" ("圆柱度" 0.05) ("圆度" 0.018))
("位置公差"
("圆跳度" 0.02 (2.0 "左轴颈" "右轴颈") "duanmian")
("同轴度" 0.02 "fai" (2.0 "左轴颈" "右轴颈") "zhumian")
)
)
)
("左轴颈"
("圆柱段特征"
("基准轴" ("轴中心线" "A"))
("直径" 120 0.059 0.037)
("长度" 191 0.5 0)
("形状"
("zdj" ("x" 10 0 0.2) 1)
("aocao"
("r1" 35 ("x" 25 2.0 0))
("r2" 20 10 ("y" 0.2 0 0.2) 5)
)
)
("表面粗糙度"
("duanmian" 6.3)
("zdj" 3.2)
("zhumian" 1.6)
("aocao1" 1.6)
("aocao2" 2.5)
)
("形状公差" ("圆柱度" 0.01 "yz") ("圆度" 0.006))
)
1
)
("左防尘板座"
("圆柱段特征"
("直径" 145.0 0.015 0.011)
("长度" 64 0 0)
("形状" ("zdj" 3 3) ("ydy" "j" 30))
("表面粗糙度"
("duanmian" 3.2)
("zhumian" 1.6)
("ydy1" 1.6)
("ydy2" 2.5)
)
("位置公差"
("圆跳度" 0.02 (2 "左轴颈" "右轴颈") "duanmian")
)
("定位点")
)
2
)
("左轮座"
("圆柱段特征"
("直径" 178 1.0 2.0)
("长度" 198 0 0)
("形状" ("zdj" ("x" 12 4.0 0) 0.5) (0))
("表面粗糙度" ("zdj" 3.2) ("zhumian" 1.6))
("形状公差"
("直线度" 0.015)
("圆柱度" 0.05 "yz")
("圆度" 0.018)
)
("位置公差"
("同轴度" 0.015 "fai" (2 "左轴颈" "右轴颈") "zhumian")
)
)
3
)
("轴身"
("圆柱段特征"
("直径" 158 2.0 0.0)
("长度" 1204 0 0)
("形状" ("zdy" "j" 75) ("ydy" "j" 75))
("表面粗糙度" ("zdy" 6.3) ("zhumian" 6.3))
)
4
)
("右轮座"
("圆柱段特征"
("直径" 178 1 -2)
("长度" 198 0 0)
("形状" ("ydj" ("x" 10 0 -2) 0.5) (0))
("表面粗糙度" ("ydj" 3.2) ("zhumian" 1.6))
("形状公差"
("直线度" 0.015)
("圆柱度" 0.05 "zz")
("圆度" 0.018)
)
("位置公差"
("同轴度" 0.015 "fai" (2 "左轴颈" "右轴颈") "zhumian")
)
)
5
)
("右防尘板座"
("圆柱段特征"
("直径" 145.0 0.2 0.12)
("长度" 64 0 0)
("形状" ("ydj" 5.0 5.0) ("zdy" "j" 25.0))
("表面粗糙度" 1.6)
("位置公差" ("圆跳度" 0.02 (1 "左轴颈") "duanmian"))
)
6
)
("右轴颈"
("圆柱段特征"
("基准轴" ("轴中心线" "B"))
("直径" 120 0.068 0.043)
("长度" 191 0.5 0)
("形状"
("ydj" ("x" 10 0 0.2) 1 "圆滑过渡")
("aocao"
("r1" 35 ("x" 25 2.0 0))
("r2" 20 10 ("y" 0.2 0 0.2) 5)
)
)
("表面粗糙度"
("duanmian" 6.3)
("ydj" 3.2)
("zhumian" 1.6)
("aocao" 1.6)
)
("形状公差" ("圆柱度" 0.01 "yz") ("圆度" 0.006))
)
7
)
("总体"
("精度特征"
("L1" 0.5 0)
("L2" 0.5 0.5)
("LX" 1.0 0)
("基准" (2 "左轴颈" "右轴颈"))
("中心孔" ("数量" 2) ("型号" "B10") ("国标号" "GB145-85"))
)
8
)
("端面"
("辅特征"
("螺纹孔"
("公称直径" 22)
("螺距" 2)
("螺孔深" 45 2.0 0)
("钻孔深" 60 5.0 0)
("倒角" 23 120)
("数量" 3)
("定位圆" 85)
("精度等级" "6H")
("分布形式" "均布")
)
("中心孔"
("阶梯锥"
("圆锥" 28 21 ("x" 2 0.2 0) 120)
("角度" 60 "max")
("总长" 25 2.0 0)
("圆柱" 10)
)
)
("位置公差"
("位置度" 0.2 "fai" (1 "左轴颈") "lwkzhongxin")
("平行度" 0.2 "fai" (1 "左轴颈") "lwkzhongxin")
)
)
9
)
("轴型及辅助信息"
("附加条件"
("轴型" "RC3型车轴")
("重量" "315")
("材料" "LZ")
("比例" "1:10")
("其余表面粗糙度" 6.3)
)
10
)
)
)
(setq js0 (assoc kspring shuju))
;(setq tezhen (car xiug))
(setq js2 (cadr js0))
(setq js3 (cdr js2))
(setq shuzh gaix)
(setq js4 (assoc gaix js3))
(setq js5 (cdr js4)) ;
(if (= shuzh "位置公差")
(progn
(setq gai1 (nth 0 js5))
(setq gai2 (nth 1 js5))
(princ js5)
(cond ((and (/= gai1 nil) (/= gai2 nil))
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
(setq newshu2 (subst ga js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
((/= gai1 nil)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq ga (subst gai11 gai1 js4))
(setq newshu2 (subst ga js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
)
)
)
(if (or (= shuzh "直径") (= shuzh "长度"))
(progn
(princ js4)
(setq n (subst new1 (nth 1 js4) js4))
(setq n (subst new2 (nth 2 js4) n))
(setq n (subst new3 (nth 3 js4) n))
(setq newshu2 (subst n js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
(if (= shuzh "形状公差")
(progn
(setq gai1 (nth 0 js5))
(setq gai2 (nth 1 js5))
(setq gai3 (nth 2 js5))
(princ js5)
(cond ((and (/= gai1 nil) (/= gai2 nil) (/= gai3 nil))
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq gai33 (subst new3 (nth 1 gai3) gai3))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
(setq ga (subst gai33 gai3 ga))
(setq newshu2 (subst ga js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
((and (/= gai1 nil) (/= gai2 nil))
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
(setq newshu2 (subst ga js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
((/= gai1 nil)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq ga (subst gai11 gai1 js4))
(setq newshu2 (subst ga js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
)
)
) ;if 形状公差
(if (= shuzh "形状")
(progn
(princ js5)
(setq xzh (car (nth 0 js5)))
(setq xzh1 (car (nth 1 js5)))
(setq js6 (nth 0 js5)) ;(zdj (x 10 0 0.2) 0.3)
(setq js7 (nth 1 js6)) ;x
(setq js8 (nth 2 js6)) ;y
(setq js66 (nth 1 js5)) ;y
(setq js77 (nth 1 js66)) ;j/q
(setq js88 (nth 2 js66)) ;r
(cond ((and (or (= xzh "zdj") (= xzh "ydj"))
(or (= xzh1 "zdy") (= xzh1 "ydy"))
)
(if (listp (cadr js6))
(progn
(setq n (subst new1 (nth 1 js7) js7))
(setq n (subst new2 (nth 2 js7) n))
(setq n (subst new3 (nth 3 js7) n))
(setq js (subst n js7 js6))
(setq new (subst new4 js8 js))
(setq new (subst new js6 js4))
(setq new (subst new js4 js2))
(setq new (subst new js2 js0))
(setq shuju (subst new js0 shuju))
) ;progn
(progn
(setq ne (subst new1 js7 js6))
(setq new (subst new2 js77 js66))
(setq new (subst new3 js88 new))
(setq ne (subst ne js6 js4))
(setq new (subst new js66 ne))
(setq new (subst new js4 js2))
(setq new (subst new js2 js0))
(setq shuju (subst new js0 shuju))
)
)
)
((and (or (= xzh "zdj") (= xzh "ydj"))
(and (/= xzh1 "zdy") (/= xzh1 "ydy"))
)
(progn
(if (listp (cadr js6))
(progn
(setq n (subst new1 (nth 1 js7) js7))
(setq n (subst new2 (nth 2 js7) n))
(setq n (subst new3 (nth 3 js7) n))
(setq js (subst n js7 js6))
(setq new (subst new4 js8 js))
(setq new (subst new js6 js4))
(setq new (subst new js4 js2))
(setq new (subst new js2 js0))
(setq shuju (subst new js0 shuju))
) ;progn
(progn
;(zdj 1 1);45du daojiao,只输入一个值就全变了
(setq new (subst new5 js7 js6))
(setq new (subst new js6 js4))
(setq new (subst new js4 js2))
(setq new (subst new js2 js0))
(setq shuju (subst new js0 shuju))
)
)
)
) ;or zdj ydj
((and (or (= xzh1 "zdy") (= xzh1 "ydy"))
(or (= xzh "zdy") (= xzh "ydy"))
)
(setq new (subst new1 js7 js6))
(setq new (subst new2 js8 new))
(setq new (subst new js6 js4))
;(setq new (subst new js4 js2))
(setq neww (subst new5 js77 js66))
(setq new (subst new6 js88 neww))
(setq new (subst new js66 js4))
(setq new (subst new js4 js2))
(setq new (subst new js2 js0))
(setq shuju (subst new js0 shuju))
)
((or (= xzh1 "zdy") (= xzh1 "ydy"))
(progn
(setq new (subst new5 js77 js66))
(setq new (subst new6 js88 new))
(setq new (subst new js66 js4))
(setq new (subst new js4 js2))
(setq new (subst new js2 js0))
(setq shuju (subst new js0 shuju))
)
)
)
)
) ;if zdy ydy
(if (= shuzh "表面粗糙度")
(progn
(princ js5)
(setq gai1 (nth 0 js5))
(setq gai2 (nth 1 js5))
(setq gai3 (nth 2 js5))
(setq gai4 (nth 3 js5))
(setq gai5 (nth 4 js5))
(setq n (length js5))
(cond ((= n 5)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq gai33 (subst new3 (nth 1 gai3) gai3))
(setq gai44 (subst new4 (nth 1 gai4) gai4))
(setq gai55 (subst new5 (nth 1 gai5) gai5))
(princ (nth 1 gai5))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
(setq ga (subst gai33 gai3 ga))
(setq ga (subst gai44 gai4 ga))
(setq ga (subst gai55 gai5 ga))
)
)
((= n 4)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq gai33 (subst new3 (nth 1 gai3) gai3))
(setq gai44 (subst new4 (nth 1 gai4) gai4))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
(setq ga (subst gai33 gai3 ga))
(setq ga (subst gai44 gai4 ga))
)
)
((= n 3)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq gai33 (subst new3 (nth 1 gai3) gai3))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
(setq ga (subst gai33 gai3 ga))
)
)
((= n 2)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq gai22 (subst new2 (nth 1 gai2) gai2))
(setq ga (subst gai11 gai1 js4))
(setq ga (subst gai22 gai2 ga))
)
)
((= n 1)
(progn (setq gai11 (subst new1 (nth 1 gai1) gai1))
(setq ga (subst gai11 gai1 js4))
)
)
)
(setq newshu2 (subst ga js4 js2))
(setq newshu3 (subst newshu2 js2 js0))
(setq shuju (subst newshu3 js0 shuju))
)
)
(setq fp (open "cad/shuju1.lsp" "w"))
(princ "(setq x '" fp)
(prin1 shuju fp)
(princ ")" fp)
(close fp)
)
(defun shujunew6 (js7 js8 js77 js88)
(setq dcl6_id (load_dialog "cad/fuzhi6"))
(new_dialog "fuzhi6" dcl6_id)
(setq zhounew_list '("new1" "new2" "new3" "new4" "new5" "new6"))
(setq yuanshi_list '("0.00" "0.00" "0.00" "0.00" "j" "0.00"))
(mapcar 'set_tile zhounew_list yuanshi_list)
(action_tile "accept" "(newlianjie6)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(setq dn (start_dialog))
)
(defun newlianjie6 ()
(setq new1 (atof (get_tile "new1")))
(setq new2 (atof (get_tile "new2")))
(setq new3 (atof (get_tile "new3")))
(setq new4 (atof (get_tile "new4")))
(setq new5 (get_tile "new5")) ;字符串
(setq new6 (atof (get_tile "new6")))
)
;biaomian ccdu
(defun shujunew5 ()
(setq dcl5_id (load_dialog "cad/ccdu"))
(new_dialog "ccdu" dcl5_id)
(setq zhounew_list '("new1" "new2" "new3" "new4" "new5"))
(setq yuanshi_list '("0.000" "0.000" "0.000" "0.000" "0.0"))
(mapcar 'set_tile zhounew_list yuanshi_list)
(action_tile "accept" "(newlianjie5)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 0)")
(setq d (start_dialog))
)
(defun newlianjie5 ()
(setq new1 (atof (get_tile "new1")))
(setq new2 (atof (get_tile "new2")))
(setq new3 (atof (get_tile "new3")))
(setq new4 (atof (get_tile "new4")))
(setq new5 (atof (get_tile "new5")))
)
;直径 长度及形状公差的数据修改对话框
(defun shujunew33 ()
(setq dcl3_id (load_dialog "cad/fuzhi3"))
(new_dialog "fuzhi3" dcl3_id)
(setq zhounew_list '("new1" "new2" "new3"))
(setq yuanshi_list '("000.0" "0.000" "00.000"))
(mapcar 'set_tile zhounew_list yuanshi_list)
(action_tile "accept" "(newlianjie)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(start_dialog)
)
(defun newlianjie ()
(setq new1 (atof (get_tile "new1")))
(if (or (= (get_tile "new2") "q") (= (get_tile "new2") "j"))
(setq new2 (get_tile "new2"))
(setq new2 (atof (get_tile "new2")))
)
(setq new3 (atof (get_tile "new3")))
)
;形状的修改,有四个数据修改时((zdj ("x" 10 0 -0.2) 1) ("aocao" ))
(defun shujunew4 ()
(setq dcl6_id (load_dialog "cad/fuzhi4"))
(new_dialog "fuzhi4" dcl6_id)
(setq zhounew_list '("new1" "new2" "new3" "new4"))
(setq yuanshi_list '("00.0" "00.000" "00.000" "00.00"))
(mapcar 'set_tile zhounew_list yuanshi_list)
(action_tile "accept" "(newlianjie4)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(setq dn (start_dialog))
)
(defun newlianjie4 ()
(setq new1 (atof (get_tile "new1")))
(setq new2 (atof (get_tile "new2")))
(setq new3 (atof (get_tile "new3")))
(setq new4 (atof (get_tile "new4")))
)
; 位置公差有两个数据修改时
(defun shujunew2 ()
(setq dcl2_id (load_dialog "cad/fuzhi2"))
(new_dialog "fuzhi2" dcl2_id)
(setq zhounew_list '("new1" "new2"))
(setq yuanshi_list '("0.000" "0.000"))
(mapcar 'set_tile zhounew_list yuanshi_list)
(action_tile "accept" "(newlianjie2)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(setq dx (start_dialog))
)
(defun newlianjie2 ()
(setq new1 (atof (get_tile "new1")))
(setq new2 (atof (get_tile "new2")))
)
;45 度倒角的修改
(defun shujunew1 ()
(setq dcl1_id (load_dialog "cad/daojia1"))
(new_dialog "daojia1" dcl1_id)
(set_tile "new5" "00.00")
(action_tile "accept" "(newlianjie1)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(setq dy (start_dialog))
)
(defun newlianjie1 ()
(setq new5 (atof (get_tile "new5")))
)
;过渡圆角的修改,两个数据
(defun xiudaoyuan ()
(setq dcl22_id (load_dialog "cad/daoyuan"))
(new_dialog "daoyuan" dcl22_id)
(set_tile "new5" "w")
(set_tile "new6" "00.0")
(action_tile "accept" "(newlianjie22)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(setq dz (start_dialog))
)
(defun newlianjie22 ()
(setq new5 (get_tile "new5")) ;字符串
(setq new6 (atof (get_tile "new6")))
)
;过渡圆角的修改,四个数据
(defun daoyuangai ()
(setq dcl42_id (load_dialog "cad/daoyuang"))
(new_dialog "daoyuang" dcl42_id)
(set_tile "new1" "j")
(set_tile "new2" "00.000")
(set_tile "new5" "j")
(set_tile "new6" "00.000")
(action_tile "accept" "(newlianjie42)(xiugaishu gai)")
(action_tile "cancel" "(done_dialog 4)")
(setq dt (start_dialog))
)
(defun newlianjie42 ()
(setq new1 (get_tile "new1"))
(setq new2 (atof (get_tile "new2")))
(setq new5 (get_tile "new5")) ;字符串
(setq new6 (atof (get_tile "new6")))
)
;end
这个函数怎么实现输入一个新数据以后,三维图和二维图会随着数据改变而改变的?
在确定参数修改的时候,确定按钮就点击没有用了
内存中的参数就是原来数据表中的数据,没有改变
先谢谢了哈 |
|