- UID
- 272724
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2005-6-6
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
请教各位高手
请救各位:
Sub drawcirculkarpavers()
Dim center As AcadPoint, radius As Double
Dim counter As Integer
With ThisDrawing.Utility
center = .GetPoint(, "click the position for center.")
radius = .GetDistance(center, "enter the radius")
End With
For counter = 0 To TextBox1 - 1
Set birckcircles(Count) = ThisDrawing.ModelSpace.AddCircle(center, radius - counter * radius / TextBox1)
brickcircles(counter).Color = acRed
brickcircles(counter).Update
drawmortar center, counter, radius
Next
End Sub
Sub drawmortar(center As AcadPoint, counter As interger, radius As Double)
Dim startpoint(0 To 2) As Double, endpoint(0 To 2) As Double
Dim theta As Double, stepsize As Double
Static adjust As Double
If User = True Then
stepsize = 15 * pi / 180
Else
stepsize = 30 * pi / 180
If adjust = 0 Then
adjust = 15 * pi / 180
Else
adjust = 0
End If
End If
For theta = 0 To 360 * pi / 180 Step stepsize
startpoint(0) = (radius - counter * radius / TextBox1) * Cos(theta + adjust) + center(0)
startpoint(1) = (radius - counter * radius / TextBox1) * Sin(theta + adjust) + center(1)
endpoint(0) = (radius - (counter + 1) * radius / TextBox1) * Cos(theta + adjust) + center(0)
endpoint(1) = (radius - (counter + 1) * radius / TextBox1) * Sin(theta + adjust) + center(1)
With ThisDrawing.ModelSpace
.AddLine startpoint, endpoint
.Item(.Count - a).Update
End With
Next
End Sub
编译时程序说红色标注的子过程没有定义,不知如何定义?drawmortar center, counter, radius[/COLOR] Sub drawmortar(center As AcadPoint, counter As interger, radius As [/COLOR] |
|