明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 870|回复: 1

[已解答] 谁知道这个程序的出处(帖子)?

[复制链接]
发表于 2016-6-28 16:43 | 显示全部楼层 |阅读模式
(defun c:BOM()
(if (not (tblsearch "style" "Ashine_abc"))
     (command "style" "Ashine_abc" "gbenor.shx,gbcbig.shx" "0" "1.0" "0" "N" "N" "N"))
(SETQ DS (getvar "dimscale"))
(SETQ TX (getvar "dimtxt"))
(setq SS (* (* DS TX) 1.1))
(PRINC "\呼叫零件表... ...")
(SETQ PN (getstring "\n请输入件号: "))

(if (= MM1 nil) (setq MM1 "1"))
(princ "\nSpecify Material Or [SKD11(1) /ASP23(2) /SKH-9(3) /SK3(4) /G5(5) /CD650(6) /KD20(7)] <")
(princ MM1)(princ ">: ")
(setq mat1 (getstring ))
        (if (= mat1 "")  (setq mat1 tt)) ;(setq tt mat1)
        (if (= mat1 nil) (setq mat1 MM1))
        (if (= mat1 "1") (setq mat "SKD11 /60HRC"))
        (if (= mat1 "2") (setq mat "ASP23 /63HRC"))
        (if (= mat1 "3") (setq mat "SKH-9 /64HRC"))
        (if (= mat1 "4") (setq mat "SK3 /55HRC"  ))
        (if (= mat1 "5") (setq mat "G5 /88~90HRA"))
        (if (= mat1 "6") (setq mat "CD650 /90HRA"))
        (if (= mat1 "7") (setq mat "KD20 /90HRA"  ))
       ;(if (= mat1 nil) (setq mat "SKD11 /60HRC"))
(setq MM1 mat)

(if (= QU1 nil) (setq QU1 "11"))
(princ "\n输入数量 Or [1PCS(1) /各1PCS(11) /各2PCS(12) /1SET(21) /各1SET(31)] <")
(princ QU1)(princ ">: ")
(setq qua (getstring ))
    (if (= qua "")  (setq qua tt)) ;(setq tt qua)
    (if (= qua nil) (setq qua QU1))
    (if (= qua "1") (setq qua "1PCS"))
    (if (= qua "2") (setq qua "2PCS"))
    (if (= qua "3") (setq qua "3PCS"))
    (if (= qua "4") (setq qua "4PCS"))
    (if (= qua "5") (setq qua "5PCS"))
    (if (= qua "6") (setq qua "6PCS"))
    (if (= qua "7") (setq qua "7PCS"))
    (if (= qua "8") (setq qua "8PCS"))
    (if (= qua "9") (setq qua "9PCS"))
    (if (= qua "10") (setq qua "10PCS"))
    (if (= qua "11") (setq qua "各 1PCS"))
    (if (= qua "12") (setq qua "各 2PCS"))
    (if (= qua "13") (setq qua "各 3PCS"))
    (if (= qua "14") (setq qua "各 4PCS"))
    (if (= qua "15") (setq qua "各 5PCS"))
    (if (= qua "21") (setq qua "1SET"))
    (if (= qua "22") (setq qua "2SET"))
    (if (= qua "23") (setq qua "3SET"))
    (if (= qua "24") (setq qua "4SET"))
    (if (= qua "25") (setq qua "5SET"))
    (if (= qua "31") (setq qua "各 1SET"))
    (if (= qua "32") (setq qua "各 2SET"))
    (if (= qua "33") (setq qua "各 3SET"))
    (if (= qua "34") (setq qua "各 4SET"))
    (if (= qua "35") (setq qua "各 5SET"))
(setq QU1 qua)

(if (= PP1 nil) (setq PP1 "2"))
(princ "\n指定加工工艺 Or ")
(princ "[研磨(1) /线切割一修三(2) /线切割一(3) /PG(4) /外购(5)] <")
(princ PP1)(princ ">: ")
(setq pro (getstring ))
    (if (= pro "")  (setq pro tt)) ;(setq tt proc)
    (if (= pro nil) (setq pro PP1))
    (if (= pro "1") (setq proc "研磨"))
    (if (= pro "2") (setq proc "线切割一修三"))
    (if (= pro "3") (setq proc "线切割一"))
    (if (= pro "4") (setq proc "PG"  ))
    (if (= pro "5") (setq proc "外购"))
(setq PP1 proc)

(SETVAR "attmode" 1)(SETVAR "attdia" 0) (setq cl (getvar "clayer"))
(C:l41) (command "color" 4)
(command "INSERT" "BOM" "PS" SS PAUSE SS SS "0" PN mat qua proc)(SETVAR "attdia" 1)
(command "layer" "set" cl "" "") (command "color" "ByLayer")
(princ)
)
 楼主| 发表于 2016-6-28 16:50 | 显示全部楼层
程序来自明经,忘了帖子的出处。

是个制表并按选项填表的程序,缺一个叫C:L41的文件

请问谁知道帖子的具体位置,或者,有C:L41这个文件
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-20 20:46 , Processed in 0.217788 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表