- 积分
- 2943
- 明经币
- 个
- 注册时间
- 2003-11-3
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
本帖最后由 作者 于 2003-11-18 17:22:20 编辑
Sub a1()
On Error Resume Next
Dim obj As AcadObject
Dim P1 As Variant
ThisDrawing.Utility.GetEntity obj, P1, vbCrLf & "请选择要复制的物体:"
If Err Then Exit Sub
Dim cenpnt As Variant
Dim r As Double
cenpnt = ThisDrawing.Utility.GetPoint(, "请选取圆心")
If Err Then Exit Sub
r = ThisDrawing.Utility.GetDistance(cenpnt, "请输入半径:")
If Err Then Exit Sub
Dim dist, du As Double
Dim n As Integer
n = 0
Do While n < 1
n = ThisDrawing.Utility.GetInteger("请输入复制个数:")
Loop
If Err Then Exit Sub
dist = ThisDrawing.Utility.GetReal("请输入旋转距离:")
If Err Then Exit Sub
du = dist / r
Dim i As Integer
For i = 1 To n
Set obj = obj.Copy
obj.Rotate cenpnt, du
Next
End Sub |
|