[求助]vba画圆
<p>我想画许多个圆 第一个圆圆心和半径固定 第二个开始 圆心的x坐标 和半径同等增大 </p><p>求高人指导</p> 帮帮忙啦 谢谢 下面代码可以参考一下,不是很完善,但应该算是满足你的要求。
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
页:
[1]