求样条曲线的长度
<p>如何求样条曲线的长度啊?QQ:278514959</p> <a href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=70303">http://bbs.mjtd.com/forum.php?mod=viewthread&tid=70303</a> <p>不懂啊 ,不好意思。我下载你的那个程序,但是看不到代码啊。VBA里面有语句可以直接计算样条曲线的长度吗?我想知道基本的代码。</p> Sub GetLength()<br/>'创建多段线<br/>Dim plineObj As AcadPolyline<br/>Dim points(0 To 14) As Double<br/>'定义点<br/>points(0) = 1: points(1) = 1: points(2) = 0<br/>points(3) = 1: points(4) = 2: points(5) = 0<br/>points(6) = 2: points(7) = 2: points(8) = 0<br/>points(9) = 3: points(10) = 2: points(11) = 0<br/>points(12) = 4: points(13) = 4: points(14) = 0<br/>'在模型空间创建多段线<br/>Set plineObj = ThisDrawing.ModelSpace.AddPolyline(points)<br/>ZoomAll<br/>MsgBox "多段线的长度是:" & plineObj.Length<br/>End Sub
页:
[1]