请看下面这个程序:(AutoCAD下的vba编的)
Private Sub CommandButton1_Click()
Dim HatchObject As AcadHatch Dim OuterCircle(0) As AcadCircle Dim Center As Variant Dim Radius As Double
With ThisDrawing.Utility Center = .GetPoint("Click the position or Enter the Center ordinate:") Radius = .GetDistance(Center, "Enter the radius.") End With
Set OuterCircle(0) = ThisDrawing.ModelSpace.AddCircle(Center, Radius) OuterCircle(0).color = acYellow
With ThisDrawing.Utility Center = .GetPoint("Click the position or Enter the Center ordinate:") Radius = .GetDistance(Center, "Enter the radius.") End With