changyiran
发表于 2012-4-18 00:12:53
院长是好人,永远支持院长!
xll69316
发表于 2012-4-19 18:02:29
很好用的东西,我想试用,
迷雾水珠
发表于 2012-5-17 22:47:03
好东西,顶起来!!!
xyp1964
发表于 2012-5-18 08:16:09
(defun c:BZSZ (/ #bl lst Ilst)
(defun SetBL (ctbl)
(setq xyp-bl ctbl
xyp-sc (/ xyp-bl 100.0)
)
(vlax-ldata-put "dict-xyp1964" "xyp-bl" xyp-bl)
(vlax-ldata-put "dict-xyp1964" "xyp-sc" xyp-sc)
)
(defun main-bzsz ()
(SetBL ctbl)
(setq FGDW nil)
(SETVAR "USERR1" (/ 1 xyp-bl 1.0))
(SETVAR "DIMALT" 0)
(SETVAR "DIMALTD" 2)
(SETVAR "DIMALTF" 25.4)
(SETVAR "DIMASSOC" 1)
(SETVAR "DIMASZ" 1)
(setvar "DIMATFIT" 0)
(COMMAND "DIM" "DIMBLK" "DI" "Exit")
(COMMAND "DIM" "DIMBLK1" "DI" "Exit")
(COMMAND "DIM" "DIMBLK2" "DI" "Exit")
(SETVAR "DIMCEN" (* xyp-sc 150))
(COMMAND "DIM" "DIMCLRD" "BYBLOCK" "Exit")
(COMMAND "DIM" "DIMCLRE" "BYBLOCK" "Exit")
(COMMAND "DIM" "DIMCLRT" "BYBLOCK" "Exit")
(SETVAR "DIMDLE" 0)
(SETVAR "DIMDLI" 0)
(SETVAR "DIMEXE" 200)
(SETVAR "DIMGAP" 100)
(SETVAR "DIMLIM" 0)
(SETVAR "DIMRND" 0)
(SETVAR "DIMSAH" 0)
(SETVAR "DIMSCALE" xyp-sc)
(SETVAR "DIMSE1" 0)
(SETVAR "DIMSE2" 0)
(SETVAR "DIMSHO" 0)
(SETVAR "DIMSOXD" 0)
(SETVAR "DIMTAD" 1)
(SETVAR "DIMTFAC" 1)
(SETVAR "DIMTIH" 0)
(SETVAR "DIMTIX" 1)
(SETVAR "DIMTM" 0)
(SETVAR "DIMTOFL" 1)
(SETVAR "DIMTOH" 0)
(SETVAR "DIMTOL" 0)
(SETVAR "DIMTP" 0)
(SETVAR "DIMTSZ" 0)
(SETVAR "DIMTVP" 0)
(SETVAR "DIMZIN" 0)
(if (< xyp-bl 1.0)
(command "modemacro"
(strcat "XCAD BY e派." " 当前出图比例 1:" (rtos xyp-bl 2 1))
)
(command "modemacro"
(strcat "XCAD BY e派." " 当前出图比例 1:" (rtos xyp-bl 2))
)
)
(ch-dim-text)
(princ)
)
(defun ch-dim-text (/ ss i s1 lay mode)
(while (setq SS (ssget '((0 . "DIMENSION"))))
(setq i -1)
(while (setq s1 (ssname ss (setq i (1+ i))))
(setq lay(xyp-get-dxf 70 s1)
mode (xyp-get-dxf 0 s1)
)
(cond ((= mode "DIMENSION")
(if (and (/= lay 34) (/= lay 35) (/= lay 36) (/= lay 37))
(progn
(xyp-dim-dimblk "DI")
(command "dim" "UPD" s1 "" "Exit")
)
(progn
(xyp-dim-dimblk "AR")
(command "dim" "UPD" s1 "" "Exit")
)
)
)
((or (= mode "TEXT") (= mode "MTEXT"))
(setq th (xyp-get-dxf 40 s1)
#SCALE (/ xyp-bl #bl 1.0)
)
(xyp-SUBUPD s1 40 (* th #SCALE))
)
)
)
)
)
(cmdlasc0)
(defun acc ()
(setq k15 (get_tile "k15"))
(if (= k15 "0")
(mode_tile "k16" 1)
(mode_tile "k16" 0)
)
)
(defun xyp-help () (alert "\n千万别打碎尺寸标注!"))
(if (< (getvar "DIMEXO") 200)
(progn
(setvar "DIMEXO" 200)
(setq dist-exo 200)
)
)
(if (or (< (getvar "DIMEXE") 200) (> (getvar "DIMEXE") 300))
(setvar "DIMEXE" 200)
)
(xyp-add-Block "DI")
(xyp-add-Block "AR")
(setq ctbl xyp-bl
#blxyp-bl
)
(defun main-pro ()
(if (= k15 "1")
(progn
(setq st (nth (atoi k16) lst))
(setvar "DIMTXSTY" st)
)
)
(if (< dist-exo 200)
(setq dist-exo 200)
)
(setq xyp-bl ctbl)
(SETVAR "DIMLFAC" clbl)
(setvar "dimdec" (atoi jingdu))
(SETVAR "DIMTXT" high-txt)
(SETVAR "DIMEXO" dist-exo)
(SETVAR "dimadec" (getvar "dimdec"))
(main-bzsz)
)
(xyp-initSet
'(ctbl clbl jingdu high-txt dist-exo k15 k16)
'(100.0 1.0 "0" 300.0 200.0 "0" "0")
)
(setq lst(xyp-list-style)
lst1 '("0" "0.0" "0.00" "0.000" "0.0000")
Ilst '(":row{"
("k0" "" "imagebutton" "-2" "34" "xyp1964(bzsz)" "(XYP-ABOUTME)")
"spacer;"
("" "参数" ":boxed_column{")
("ctbl" "出图比例=1:" "real" "12")
("clbl" "测量:标注=1:" "real" "12")
":row{"
("k15" "字型" "bool" "(acc)")
("k16" "" "poplist" "lst" "11")
"}"
("jingdu" "精度(DEC)" "poplist" "lst1" "11")
("high-txt" "字高(TXT)" "real" "12")
("dist-exo" "离开(EXO)" "real" "12")
"spacer;"
"}"
"}"
"spacer;"
"ioc"
("" "" "user" "(acc)")
)
)
(if (= (xyp-Dcl-Init Ilst "【标注设置-bzsz】" t) 1)
(main-pro)
)
(cmdla1)
)
timmy521
发表于 2012-5-18 08:20:17
哈哈,院长不是说要发布源代码啊。
smartstar
发表于 2012-5-18 08:23:54
期待不在是伪源码
xiaxiang
发表于 2012-5-18 08:35:19
没有裤,有裤更好!
CTC
发表于 2012-5-18 10:32:39
支持院长。
CTC
发表于 2012-5-18 10:33:57
院长,,,先发个三维标注给用下。。。谢谢。。。!!!!!!!
lohas1118
发表于 2012-5-18 10:38:32
院长很强大
页:
1
2
3
[4]
5
6
7
8
9
10