gotop 发表于 2007-5-31 00:51:00

请问AddLightWeightPolyline(points)中,points数组一定只能设置为double型吗?

<p>Dim points(0 To 9) As <font color="#ff0000">Variant </font></p><p>这样定义程序无法运行出错?</p><p>points数组一定只能设置为double型吗?</p><p><font color="#ff0000"><br/></font></p><p>Sub Example_AddLightWeightPolyline1()<br/>&nbsp;&nbsp;&nbsp; ' This example creates a lightweight polyline in model space.<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; Dim plineObj As AcadLWPolyline<br/>&nbsp;&nbsp;&nbsp; Dim points(0 To 9) As <font color="#ff0000">Variant<br/></font>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; ' Define the 2D polyline points<br/>&nbsp;&nbsp;&nbsp; points(0) = 1: points(1) = 1<br/>&nbsp;&nbsp;&nbsp; points(2) = 1: points(3) = 2<br/>&nbsp;&nbsp;&nbsp; points(4) = 2: points(5) = 2<br/>&nbsp;&nbsp;&nbsp; points(6) = 3: points(7) = 2<br/>&nbsp;&nbsp;&nbsp; points(8) = 4: points(9) = 4<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; ' Create a lightweight Polyline object in model space<br/>&nbsp;&nbsp;&nbsp; Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)<br/>&nbsp;&nbsp;&nbsp; ZoomAll<br/>&nbsp;&nbsp;&nbsp; <br/>End Sub<br/></p>

烟雨.江南 发表于 2007-5-31 08:03:00

<p>是这样的,必需是Double类型的。这个在帮助文档里面有说明的。</p>

gotop 发表于 2007-5-31 09:20:00

烟雨.江南发表于2007-5-31 8:03:00static/image/common/back.gif是这样的,必需是Double类型的。这个在帮助文档里面有说明的。

<p class="element">恩,谢谢了</p><p class="element">我在帮助文档中找到这个说明了</p><p class="element">我还以为它说支持<font color="#000000">Variant呢,我的英语太菜了~~~</font><br/><br/></p><p class="element">VerticesList</p><p class="element-desc">Variant (array of doubles)<br/></p>
页: [1]
查看完整版本: 请问AddLightWeightPolyline(points)中,points数组一定只能设置为double型吗?