Private Sub CommandButton1_Click()
AutoCAD.Application.Visible = True‘该语句有没有都可以
UserForm1.Hide
Call DrawArc
End Sub
Private Sub DrawArc()
Dim NewArcObj As AcadArc
Dim Center As Variant, Radius As Double
Dim StartAngle As Double, EndAngle As Double
With ThisDrawing.Utility
Center = .GetPoint(, vbCr & "Enter the center point OR Click on center point:")
Radius = .GetDistance(Center, vbCr & "Enter the raduis:")
StartAngle = .GetAngle(Center, vbCr & "Enter the start angle:")
EndAngle = .GetAngle(Center, vbCr & "Enter the end angle:")
End With
Set NewArcObj = ThisDrawing.ModelSpace.AddArc(Center, Radius, StartAngle, EndAngle)
NewArcObj.Update
End Sub |