我插入了一个块之后对其进行分解,然后遍历再填充,但是画出来的结果,却有两个块,其中一个块有填充,而另一个却没有,给一段小程序,麻烦大家帮我看看。另外给一下图,请大家帮忙分析一下问题出在哪里。 Dim loop1(0 To 11) As AcadEntity, tian As AcadHatch Set tian = adoc.ModelSpace.AddHatch(0, "ANSI31", True) ......................................... Set kuang1 = adoc.ModelSpace.AddLightWeightPolyline(ptl1) point2(0) = ptl1(6): point2(1) = ptl1(7) - 75 Set blockrefobj = adoc.ModelSpace.InsertBlock(point2, "槽钢200", 1, 1, 1, 1.5708)'旋转了90度 Dim fenjie As Variant fenjie = blockrefobj.Explode For i = 0 To UBound(fenjie) Set loop1(i) = fenjie(i) Next i
tian.AppendOuterLoop (loop1) tian.Evaluate tian.Update 希望高手解答原因,或给出修正程序的思路,谢谢! |