代码如下: Dim varCenter(0 To 2) As Double Dim varFirst_1(0 To 2) As Double Dim varSecond_1(0 To 2) As Double Dim varThird_1(0 To 2) As Double Dim varFirst_2(0 To 2) As Double Dim varSecond_2(0 To 2) As Double Dim varThird_2(0 To 2) As Double Dim dblRadius As Double Dim dblAngle As Double Dim varRegions As Variant Dim objEnt() As AcadEntity varCenter(0) = 1000 varCenter(1) = 1000 varCenter(2) = 0 dblRadius = 100 dblAngle = 3.1415926 With ThisDrawing.ModelSpace ReDim objEnt(2) Set objEnt(0) = .AddArc(varCenter, dblRadius * 0.5, dblAngle, 0) Set objEnt(1) = .AddLine(objEnt(0).StartPoint, objEnt(0).EndPoint) Set objEnt(2) = .AddPoint(varCenter) varRegions = .AddRegion(objEnt) End With ZoomAll
已经生成了Region,但是怎么为这个面域填充颜色呢? |