- 积分
- 247
- 明经币
- 个
- 注册时间
- 2004-10-24
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Sub Example_AddDimAligned() Dim dimObj As AcadDimAligned Dim fenkua(500, 2) As Double Dim pt1(2) As Double Dim pt2(2) As Double Dim pt3(3) As Double Dim text As String Dim dunshu As Double Dim bili As Integer Dim i As Integer bili = 2 i = 5 dunshu = 20 For i = 1 To dunshu fenkua(i, 0) = i fenkua(i, 1) = i * 2 fenkua(i, 2) = 0 Next i For i = 1 To dunshu - 1 pt1(0) = fenkua(i, 0) pt1(1) = fenkua(i, 1) pt1(2) = 0 pt2(0) = fenkua(i + 1, 0) pt2(1) = fenkua(i + 1, 1) pt2(2) = 0 pt3(0) = (fenkua(i, 0) + fenkua(i + 1, 0)) / 2 + 2.5 * 2 * bili pt3(1) = (fenkua(i, 1) + fenkua(i + 1, 1)) / 2 + 2.5 * 2 * bili pt3(2) = 0 text = 30 Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(point1, point2, pt3) dimObj.TextOverride = text Next i ZoomAll End Sub
|
|