- 积分
- 24557
- 明经币
- 个
- 注册时间
- 2004-3-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-11-17 22:06:00
|
显示全部楼层
加一个函数
Sub AddDonut(ByVal Center, ByVal Radius As Double, ByVal Width As Double) Dim oLW As AcadLWPolyline Dim pnts(3) As Double pnts(0) = Center(0) - Radius: pnts(1) = Center(1) pnts(2) = Center(0) + Radius: pnts(3) = Center(1) Set oLW = ThisDrawing.ModelSpace.AddLightWeightPolyline(pnts) oLW.Closed = True oLW.SetBulge 0, 1 oLW.SetBulge 1, 1 oLW.SetWidth 0, Width, Width oLW.SetWidth 1, Width, Width oLW.Update End Sub
把
Set circ = ThisDrawing.ModelSpace.AddCircle(centerpt, radius)
改为
AddDonut centerpt,radius, 1
|
|