我写了一个: - Sub fg()
- '这个小程序可连续画圆点
- Dim pt As Variant
- Dim r As Double
- Dim pl As AcadLWPolyline
- Dim ptt(3) As Double
- MsgBox ("如要结束输入过程,在提示输入实心点的圆心时按ESC键或Enter键")
- On Error GoTo bbb
- aaa: pt = ThisDrawing.Utility.GetPoint(, "请输入实心点的圆心:")
- r = ThisDrawing.Utility.GetDistance(pt, "请输入实心点的半径:")
- ptt(0) = pt(0)
- ptt(1) = pt(1) - r / 2
- ptt(2) = pt(0)
- ptt(3) = pt(1) + r / 2
- Set pl = ThisDrawing.ModelSpace.AddLightWeightPolyline(ptt)
- pl.Closed = True
- pl.SetWidth 0, r, r
- pl.SetWidth 1, r, r
- pl.SetBulge 0, 1
- pl.SetBulge 1, 1
- GoTo aaa
- bbb:
- End Sub
|