|
第三课思考题代码
Sub 画圆()* S- r9 Z7 ^" B" w) [; G! e
Dim p1 As Variant. Q+ t4 U8 `9 }
6 m: K/ W5 O1 E. u
Dim z As Double) S$ m8 J1 u% u. n# r) E2 L& B
" r5 v" N2 ~) A9 B# TDo# U* u2 Q$ f! I# U! J
0 w! @0 U( f5 T2 b' [
p1 = ThisDrawing.Utility.GetPoint(, "请指定圆心"): e7 x3 B5 R. I# Q8 D; h9 t( x8 {
6 B' J m& i" C6 K
z = ThisDrawing.Utility.GetReal("请输入半径")
0 L: Y! B2 A% Q0 K# d+ O
4 h0 I4 `' @/ a) z' |: u+ q. TCall ThisDrawing.ModelSpace.AddCircle(p1, z)
- D4 q: M& V9 D' W# ^3 S) n, k$ o* T; c! Y/ ?% W
On Error GoTo err_control& x+ `% _7 k. r( J! V; _
8 S5 h2 |' {$ ?* ~0 z$ g$ V& W0 e T+ ]3 `# z$ e% y( V0 Z
Loop% C7 {7 A6 @' C6 b" S: k
$ V' ^& Z/ K7 |6 y" eerr_control:
0 m$ I7 {+ h1 z# u* e9 J) ?; K4 p8 _' F3 z- i
5 ~) d3 H! L- ?( I1 y- R w% B
/ s* h2 u$ x7 ^4 t9 ]4 h) K G, j t& ~8 }: }
End Sub |
|