其他网上收集的,已经注明出处,收点明经币
用不了.................................. yangchao2005090 发表于 2018-7-27 16:56
网上下载的,已经注明出处,大概整理了一下,收1明经币
用不了,运行出错!!!请选择一条线Error: Automation 错误。 文件处理器错误 画流向箭头
(defun c:hlxjt ()
(setvar "osmode" 0)
(setvar "cmdecho" 0)
(command "UCS" "w")
(setq pa (getpoint "\n请确定流向箭头的起点:"))
(setq pb (getpoint pa "\n请确定流向箭头的流向:"))
(setq pc (polar pa (+ (angle pa pb) 1.570796327) 50))
(command "UCS" "3" pa pb pc)
(command "UCS" "m" (list 0 -15))
(setq p0 (list 0 0 0))
(setq p1 (list 18 15 0))
(setq p2 (list 0 30 0))
(setq p3 (list 28 22 0))
(setq p4 (list 82 17.5 0))
(setq p5 (list 60 30 0))
(setq p6 (list 100 15 0))
(setq p7 (list 60 0 0))
(setq p8 (list 82 12.5 0))
(setq p9 (list 28 8 0))
(command "_color" 5)
(command "_pline" p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 "c")
(command "_hatch" "solid" (entlast) "")
(command "_color" "byblock")
(command "UCS" "w")
(setvar "osmode" 35)
) 画弯箭头
(defun C:hjt()
(prompt "\n绘制箭头")
(setvar "cmdecho" 0)
(setq oldmode (getvar "osmode"))
(setvar "osmode" 0)
(initget "A B C")
(setq enda (getkword "\n直箭头A/弯箭头B/大弯箭头<C> <A>")
enda (if enda enda "A"))
(while (setq p1 (getpoint "\n箭头的尖端位置:")
p2 (getpoint p1 "\n箭头的另一端:")
dd (distance p1 p2))
(prompt (rtos dd 2 4))
(setq w (* dd 1.2)
an (angle p1 p2)
p3 (polar p2 (+ an (* pi 0.5)) (/ w 2.0))
p4 (polar p2 (+ an (* pi 1.5)) (/ w 2.0)))
(if (= enda "A")
(progn
(command "solid" p1 p3 p1 p4 ""
"pline" p2 "w" (* w 0.4) (* w 0.4) (polar p2 an (getdist p2)) "")
)
)
(if (= enda "B")
(command "pline" p1 "w" "0" w p2 "w" (* w 0.4) (* w 0.4) "a" pause "")
)
(if (= enda "C")
(command "pline" p1 "w" "0" w p2 "w" (* w 0.4) (* w 1.2) "a" pause "")
)
(if (= p1 nil) (exit))
)
(setvar "osmode" oldmode)
(prin1)
)
页:
1
[2]