组合两个命令-expo
创建一个例程,当用户在fillet命令期间选择对象时,它首先将其分解,这有多困难?我不能用直多段线和分解弧以半径圆角。如果两者都爆炸。我可以用半径圆角。
我希望这是关于。。。这将节省大量额外的爆炸!英雄联盟
再次感谢你。 “during”命令是一个问题,您可以先拾取两个对象,然后“批圆角”它们(我希望我的解释正确)。
我试图编写一些解决方案,但失败了-至少最终得到了一些“方便”的子功能:
; _$ (_PickSegment "\nPick something: ") -> (<Entity name: 8998e85ce0> (297752.0 -203065.0 0.0))
; Returns the 'entsel' result from the picked Line/Arc or if Polyline, list of: (<PickedSegment Ename> <PickedPoint>)
(defun _PickSegment ( msg / pick e typ newpick Exploded o r ) (setvar 'errno 0)
(while (/= 52 (getvar 'errno)) (setq pick (entsel msg))
(cond
( (= 7 (getvar 'errno)) (setvar 'errno 0) ) ( (not (setq e (car pick))) )
( (wcmatch (setq typ (cdr (assoc 0 (entget e)))) "*POLYLINE")
(setq newpick ; We've just exploded the POLYLINE, now find the associated entity segment from the 'Exploded' list, by temporarily erasing any overlapping entities
(
(lambda ( p L / s tmp r dL )
(while (and (not s) (setq tmp (car (nentselp p))))
(or
(and (setq r (cdr (assoc (cdr (assoc 5 (entget tmp))) L))) (setq s T))
(and (setq dL (cons tmp dL)) (entdel tmp))
)
)
(if dL (mapcar 'entdel dL)) (if r (list r p))
)
(cadr pick) (setq Exploded (mapcar '(lambda (x) (cons (vlax-get x 'Handle) (vlax-vla-object->ename x))) (vlax-invoke (setq o (vlax-ename->vla-object e)) 'Explode)))
)
)
(mapcar 'entdel (mapcar 'cdr Exploded)) ; Erase every generated object from the 'Explode' method
(entdel (car newpick)) ; UnErase the segment entity
(setq r newpick) (setvar 'errno 52)
)
( (member typ '("LINE" "ARC")) (setq r pick) (setvar 'errno 52) )
)
)
r
); defun _PickSegment
可能会帮助那些在这里尝试的人。。
顺便说一句,我认为有解决你的问题的方法(也许更仔细地搜索?) mstg007您需要发布一个图像或dwg,显示您试图做什么,您可能不需要爆炸。 希望这会有所帮助。红线是一条“线”。如果我引爆一切。它起作用了。这就是为什么我想知道是否有一个常规的可能性,将与这些情况下工作。
这显然与此相关:
https://www.theswamp.org/index.php?topic=51357.0 你说得太对了。谢谢你的交叉帖子。
页:
[1]