我至少可以通过这部分例行程序进行优化:
Do While objSS.Count > 1
Set entPrimary = objSS.Item(0)
For i = 1 To objSS.Count - 1
Set entSecondary = objSS.Item(i)
varPt = entPrimary.IntersectWith(entSecondary, acExtendNone)
If UBound(varPt) > 1 Then colPt.Add (varPt)
Next
Set entObj(0) = entPrimary
objSS.RemoveItems entObj <<Excludes line just used
Loop
我肯定会添加一些健壮的错误检查和捕获。选择过程中有很多问题-大卫 很好,大卫,我喜欢。 这段代码很好用!!你太棒了!!对于像我这样的初学者来说,这段代码也很可爱。。!!
还有一个问题我需要一些帮助。。
我的基线并不总是Acadline,它可以是多段线,甚至在某些地方是圆弧。还有,有没有一种方法可以让我在继续选择交叉之前继续选择基线。
请参考附件。。
再次感谢您的帮助!!
当做
普里扬卡
如果点位于某些空间层上,并且点到PLINE有一个最大允许距离,这将非常有用。
你可以发布一个示例DWG吗? 大家好,
代码运行良好。。我只需要它在基线是多段线的地方工作。我无法找到所有要修改的地方,因为它使用了直线的起点和终点,但我的基线是一条多段线。。
请帮忙!!
我是如此的近,却又如此的远
图纸1.dwg 这个问题比本文前几篇文章中讨论的要复杂得多。考虑可能包含或不包含圆弧的多段线,将减缓这一已经效率低下的过程。
再一次,我的身体有点瘦,无法立即提供任何帮助。如果一切顺利——而另一个解决方案在此期间没有出现——也许我可以在本周末研究一下。 是 啊tats wat!!我尝试使用所有这些代码,在这些代码中,可以同时将弧分解为直线,将多段线分解为直线,但它会将多段线/圆弧分解为直线的一小部分,因此很难定位可能有垂直线落在其上的一小段直线。
谢谢和问候,
普里扬卡 That problem is considerably more complex than was discussed in the first few posts of this thread. Accounting for polylines, which may or may not incorporate arcs, will slow down this already inefficient process.
Once again I’m spread a bit too thin to offer any immediate help.If all goes well – and another solution doesn’t show up in the interim – perhaps I can look into it this weekend. Yeah.. tats wat!! I tried using all those codes where you can explode arcs to lines and polylines to lines all at the same time but then it breaks the polyline/arc into such small parts of lines that it becomes extreeeemely difficult to locate the small bit of line which could have a perpendicular line landed upon it.
Thanks and Regards,
Priyanka
页:
1
[2]