her01983 发表于 2008-9-26 16:29:00

求样条曲线的长度

<p>如何求样条曲线的长度啊?QQ:278514959</p>

azjmjsj 发表于 2008-9-27 12:51:00

<a href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=70303">http://bbs.mjtd.com/forum.php?mod=viewthread&tid=70303</a>

her01983 发表于 2008-9-28 17:34:00

<p>不懂啊 ,不好意思。我下载你的那个程序,但是看不到代码啊。VBA里面有语句可以直接计算样条曲线的长度吗?我想知道基本的代码。</p>

azjmjsj 发表于 2008-9-28 20:37:00

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 "多段线的长度是:" &amp; plineObj.Length<br/>End Sub
页: [1]
查看完整版本: 求样条曲线的长度