嗯,样条曲线可以!主要是StartTangent、 EndTangent这两个参数的设置,在这两个参数中的三个元素是不是第一个是对于X轴的tangent,第二个参数是关于Y轴的tangent,第三个参数是关于Z轴的tangent. 我做了一个桥型曲线,效果还可以 Sub drawspline() Dim x As AcadSpline Dim pt(1 To 75) As Double Dim xlapp As Excel.Application Dim xlbook As Workbook Dim xlsheet As Worksheet Dim startangent(0 To 2) As Double Dim endtangent(0 To 2) As Double startangent(0) = 0 startangent(1) = 0 startangent(2) = 0 endtangent(0) = 0 endtangent(1) = 0 endtangent(2) = 0 Set xlsApp = New Excel.Application Set xlbook = xlsApp.Workbooks.Open("F:\CAD练习\book1.xls") Set xlsheet = xlbook.Worksheets("sheet1") For i = 1 To 75 Step 3 With xlsheet pt(i) = .Cells(i, 1) pt(i + 1) = .Cells(i, 2) pt(i + 2) = .Cells(i, 3) End With Next i Set x = ThisDrawing.ModelSpace.AddSpline(pt, startangent, endtangent) End Sub |