恳请高手帮忙啊都快疯了。AddSpline怎用使用Closed 属性
<p>真的,帮帮忙!在线等!都研究了两天了,发疯了!</p><p>如题,AddSpline怎用使用Closed 属性?</p><p>例:Private Sub Command12_Click()<br/>'非有理B样条<br/> Dim VetPoints(0 To 8) As Double<br/> Dim anObj As AcadSpline<br/> Dim Stan(0 To 2) As Double<br/> Dim Etan(0 To 2) As Double<br/> VetPoints(0) = 16: VetPoints(1) = 90: VetPoints(2) = 0: VetPoints(3) = 48: VetPoints(4) = 120<br/> VetPoints(5) = 0: VetPoints(6) = 100: VetPoints(7) = 70: VetPoints(8) = 0<br/> Stan(0) = 2: Stan(1) = 8: Stan(2) = 0<br/> Etan(0) = 3: Etan(1) = 1: Etan(2) = 0<br/> Set anObj = MoSpace.AddSpline(VetPoints, Stan, Etan)<br/> anObj.Update<br/> ZoomAll<br/>End Sub<br/></p><p>为什么不能直接使用“anobj.closed=true”,系统会提示说“不能给只读属性赋值”</p><p>而下面这个例子:</p><p>Private Sub Command11_Click()<br/>'创建多段线<br/> Dim plineObj1 As AcadPolyline<br/> Dim points(0 To 11) As Double<br/> points(0) = 10: points(1) = 65: points(2) = 0<br/> points(3) = 10: points(4) = 80:<br/> points(6) = 30: points(7) = 80:<br/> points(9) = 45: points(10) = 80:<br/> Set plineObj1 = AcadDoc.ModelSpace.AddPolyline(points)<br/> plineObj.Closed = True</p><p>end sub</p><p>就可以直接使用“plineObj.Closed = True”,就能闭合。</p><p>为什么呢?会的大侠,麻烦帮个忙,不甚感激!</p><p></p> <p class="element">Closed:read-only for spline objects; read-write for all others <br/>You can close the spline so the start point and endpoint are coincident and tangent. </p><p></p> 首尾相连自然就闭合了 <p>谢谢二楼的。为什么偏偏是spline的closed属性是可读的呢?真是的!那参考书里还说,用close属性,这不是害人的吗?</p>
页:
[1]