具体的操作步骤看下面的例子,其中外环要定义成包含四个实体的数组。如Dim outerLoop(0 To 3) As AcadEntity,然后一一将四条直线赋给它,如:Set outerLoop(0) = ln1,……。其它一样,使用hatchObj.AppendOuterLoop (outerLoop)往图案填充中添加外环。
' 创建图案填充的外边界。(一个圆)
Dim outerLoop(0 To 0) As AcadEntity
Dim center(0 To 2) As Double
Dim radius As Double
center(0) = 3: center(1) = 3: center(2) = 0
radius = 1
Set outerLoop(0) = ThisDrawing.ModelSpace. _
AddCircle(center, radius)