下面代码可以参考一下,不是很完善,但应该算是满足你的要求。-
- Sub xxxx(X As Double, Y As Double, Z As Double, R As Double, N As Integer, S As Double)
- '参数 X :第一个圆的X坐标
- ' Y : Y坐标
- ' Z : Z
- ' R : 半径
- ' N :圆的个数
- ' S :每次增大量
-
- Dim Cen(0 To 2) As Double
- Dim D As Double
- Dim Nx As Integer
- Cen(0) = X: Cen(1) = Y: Cen(2) = Z
- D = R
- For Nx = 1 To N
- If Nx = 1 Then
- ThisDrawing.ModelSpace.AddCircle Cen, D
- Else
- Cen(0) = Cen(0) + S
- D = D + S
- ThisDrawing.ModelSpace.AddCircle Cen, D
- End If
- Next Nx
- End Sub
|