[讨论]AddLightWeightPolyline无效
<p>实时错误 '-2145320943 (80210011)':</p><p>Too few elements in SafeArray or total number of elements is not a multiple of three</p><p>-------------------------------------------------------------------</p><p>以下代码开始运行的好好的,不知何时突然不行了!</p><p>Dim PL(10) As Double</p><p> PL(0) = 0<br/> PL(1) = 0</p><p> PL(2) = 0<br/> PL(3) = 300</p><p> PL(4) = 300<br/> PL(5) = 300</p><p> PL(6) = 300<br/> PL(7) = 0</p><p> PL(8) = 0<br/> PL(9) = 0</p><p>Set PP = acaddoc.ModelSpace.AddLightWeightPolyline(PL)</p> <pre class="Code"><pre class="Code">SubAddLightWeightPolyline()<br/> ' This example creates a lightweight polyline in model space.<br/> <br/> Dim plineObj As AcadLWPolyline<br/> Dim points(0 To 9) As Double<br/> <br/> ' Define the 2D polyline points<br/> points(0) = 0: points(1) = 0<br/> points(2) = 0: points(3) = 300<br/> points(4) = 300: points(5) = 300<br/> points(6) = 300: points(7) = 0<br/> points(8) = 0: points(9) = 0<br/> <br/> ' Create a lightweight Polyline object in model space<br/> Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)<br/> <br/> <br/>End Sub<br/></pre><pre class="Code">试试看</pre></pre> <p>感谢,楼上!</p><p>错误原因找到了!</p>
页:
[1]