沿多段线w测量块
你好我需要一个Lisp,它可以通过指定长度沿多段线测量块
(长度应始终从0开始计算,即多段线的起点)
E示例:
绘图单位为米
我有一条10Km(10000m)的道路中心线,如果我进入长度为3300m的路段,应放置在3300m处
如果我输入长度5600m,块应放置在5600m处
非常感谢
湿婆
你好
这个街区叫什么名字?
那方块的旋转呢?
它是属性块吗? 尝试Alan的沿曲线复制程序的动态选项。
或者你可以使用我的旧空间沿曲线程序。 你好
块名为CATCH\u PIT,具有一个属性,如图所示
旋转垂直于道路路线,如我随附的图纸所示
无法附加文件大小超过1MB
谢谢
湿婆
本练习旨在沿多段线(道路长度为36.6Km)放置具有特定链长的CATCH_坑块 属性的值是什么?是要求用户输入还是静态值? 是的,它将要求用户输入(不同) 试试这个草稿,让我知道。
(defun c:Test(/ blk s e l d v)
;; Tharwat 07.Feb.2016 ;;
(setq blk "CATCH_PIT")
;; Block name
(if (and (tblsearch "BLOCK" blk)
(princ "\nSelect LWpolyline :")
(setq s (ssget "_+.:S:E" '((0 . "LWPOLYLINE"))))
(setq l (vlax-curve-getdistatpoint
(setq e (ssname s 0))
(vlax-curve-getendpoint e))))
(while
(and
(setq d
(getdist
(strcat "\nSpecify distance less than "
(rtos l 2 2)
" > :")
)
)
(< d l)
(/= "" (setq v (getstring t "\nSpecify Attribute Value :")))
)
(entmake
(list '(0 . "INSERT")
(cons 10 (vlax-curve-getpointatdist e d))
(cons 50
(+ (* pi 0.5)(angle '(0. 0. 0.)
(vlax-curve-getfirstderiv
e
(vlax-curve-getparamatpoint
e
(vlax-curve-getpointatdist e d))))))
(cons 2 blk)
)
)
(if (> d l)
(alert "\nLong distance entered !")
)
)
)
(princ)
)(vl-load-com)
做得很好,但唯一的事情是将块平行放置在对齐位置,如图所示
以上代码已更新,请重试。
页:
[1]
2