这是一个唇的开始,它将圆添加到线的末端需要两条额外的线来获得线角度,使用Assoc 11作为其他端点,只需将命令从“圆”更改为在端点pt处插入一个带有旋转和缩放的块。唯一的错误是将绘制箭头的方向线绘制进去。学习lisp的好时机?
- ; add a circle to end of lines for import into the DRAINS software
- (setq oldsnap (getvar "osmode"))
- (setvar "osmode" 0)
- (command "layer" "n" "PITS" "Color" 1 "PITS" "s" "PITS" "")
- (setq ent (car (entsel "\nSelect drain layer: ")))
- (setq l_name (cdr (assoc 8 (entget ent))))
- (setq listlines (ssget "X" (list (cons 0 "line")(cons 8 l_name))))
- (setq listlinesno (sslength listlines))
- (setq y 0)
- (repeat listlinesno
- (setq pt1 (cdr (assoc 10 (entget (ssname listlines y))))) [color=red]; add pt2 here assoc 11 and angle pt1 pt2
- [/color] (command "circle" pt1 1.0) [color=red]; change this to be insert arrowblock
- [/color] (setq y (+ y 1))
- ) ;end repeat listlineno
- (setvar "osmode" oldsnap)
|