attach://132823.gif d1742647821 发表于 2024-2-26 15:38
attach://132823.gif
你想表达什么意思啊? 和bo类似的
tiancao100 发表于 2024-2-26 17:31
和bo类似的
是这样子的 yefei812678 发表于 2024-2-26 17:32
是这样子的
能发一个嘛
(defun c:kdk(/entpt p1 p2 p3 p0 len len1 minpoint maxpoint)
(if (= (tblobjname "layer" "开洞线") nil)
(entmake (list'(0 . "layer")'(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord")
(cons 2 "开洞线") '(70 . 0) '(62 . 8)
)))
(while
(setq pt (getpoint "\n在闭合区域拾取一点<退出>:"))
(vl-cmdf "-boundary" pt "")
(setq ent (entlast))
(vla-getboundingbox (vlax-ename->vla-object ent) 'minpoint 'maxpoint) ;获得包围盒
(setq p1(vlax-safearray->list minpoint) p3(vlax-safearray->list maxpoint)) ;盒最小与最大点
(entdel ent)
(setq p2 (list (car p1)(cadr p3)))
(setq len (distance p1 p2))
(setq len1 (distance p3 p2))
(if (< len len1)
(setq p0 (polar p1 (/ pi 3)(* len 0.8)))
(setq p0 (polar p1 (/ pi 2.2)(* len 0.8)))
)
(entmake (list'(0 . "LWPOLYLINE")'(100 . "AcDbEntity")'(100 . "AcDbPolyline")(cons 8 "开洞线")
(cons 90 3) (cons 10 p1) (cons 10 p0) (cons 10 p3) ))
)
(princ)) 本帖最后由 yefei812678 于 2024-2-27 08:44 编辑
bai2000 发表于 2024-2-26 18:19
(defun c:kdk(/entpt p1 p2 p3 p0 len len1 minpoint maxpoint)
(if (= (tblobjname "layer" "开 ...
谢谢
能不能不建图层就设置为当前图层,折线靠右边颜色为250线型为DASHED比例为1 本帖最后由 yefei812678 于 2024-2-27 11:44 编辑
bai2000 发表于 2024-2-26 18:19
(defun c:kdk(/entpt p1 p2 p3 p0 len len1 minpoint maxpoint)
(if (= (tblobjname "layer" "开 ...
我改了下 现在就是方向改不过来我要的折线方向和你的折线方向镜像下就好了不知道怎么改,我想要的是我图片上的哪个方向。
(defun c:kd(/entpt p1 p2 p3 p0 len len1 minpoint maxpoint)
(if (null (tblsearch "ltype" "DASHED")) (command "-linetype" "L" "DASHED" "" ""))
(while
(setq pt (getpoint "\n在闭合区域拾取一点<退出>:"))
(vl-cmdf "-boundary" pt "")
(setq ent (entlast))
(vla-getboundingbox (vlax-ename->vla-object ent) 'minpoint 'maxpoint) ;获得包围盒
(setq p1(vlax-safearray->list minpoint) p3(vlax-safearray->list maxpoint)) ;盒最小与最大点
(entdel ent)
(setq p2 (list (car p1)(cadr p3)))
(setq len (distance p1 p2))
(setq len1 (distance p3 p2))
(if (< len len1)
(setq p0 (polar p1 (/ pi 2.5)(* len 0.8)))
(setq p0 (polar p1 (/ pi 2.2)(* len 0.8)))
)
(entmake (list'(0 . "LWPOLYLINE")'(100 . "AcDbEntity")'(100 . "AcDbPolyline")
(cons 90 3) (cons 10 p1) (cons 10 p0) (cons 10 p3) ))
(command "CHPROP" (last_ent ent) """lt" "DASHED" "C" "8""s" "1" "")
)
(princ)) bai2000 发表于 2024-2-26 18:19
(defun c:kdk(/entpt p1 p2 p3 p0 len len1 minpoint maxpoint)
(if (= (tblobjname "layer" "开 ...
谢谢分享 为什么用的时候文字怎么显示不正常呢 怎么觉得你这么傲慢呢。。。。
页:
1
[2]