- 积分
- 11502
- 明经币
- 个
- 注册时间
- 2002-10-2
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-4-12 21:55:00
|
显示全部楼层
Sub arc_to_circle() Dim Centre As Variant Dim BasePnt As Variant Dim Rad As Double Dim ReturnObj As AcadArc Dim circleObj As AcadCircle Dim Descript As String Do On Error Resume Next ThisDrawing.Utility.InitializeUserInput 1, " " ThisDrawing.Utility.GetEntity ReturnObj, BasePnt, "选择圆弧<Enter结束>:" If Err <> 0 Then Descript = Err.Description Err.Clear If Descript = "类型不匹配" Then MsgBox "不是圆弧!" Else If Descript = "用户输入的是关键字" Then Exit Do Else MsgBox "没有选择!" End If End If Else Centre = ReturnObj.center Rad = ReturnObj.radius ReturnObj.Delete Set circleObj = ThisDrawing.ModelSpace.AddCircle(Centre, Rad) End If Loop End Sub |
|