|
帮助文档中说:(见下)
Each object in the region retains its layer, linetype, and color. deletes the original objects after converting them to regions and does not hatch the regions by default.
在面域中的每一对象保留着其图层、线型和颜色。AutoCAD 在将它们转换为面域后删除了原始对象,默认情况下面域不填充。
可是我用帮助文档中addregion的例子时,再绘图界面上将创建的region移开后发现原来用来创建region的图元没有被删除??
帮助文档中的例子是:
Sub Example_AddRegion()
' This example creates a region from an arc and a line.
Dim curves(0 To 1) As AcadEntity
' Define the arc
Dim centerPoint(0 To 2) As Double
Dim radius As Double
Dim startAngle As Double
Dim endAngle As Double
centerPoint(0) = 5#: centerPoint(1) = 3#: centerPoint(2) = 0#
radius = 2#
startAngle = 0
endAngle = 3.141592
Set curves(0) = ThisDrawing.ModelSpace.AddArc(centerPoint, radius, startAngle, endAngle)
' Define the line
Set curves(1) = ThisDrawing.ModelSpace.AddLine(curves(0).startPoint, curves(0).endPoint)
' Create the region
Dim regionObj As Variant
regionObj = ThisDrawing.ModelSpace.AddRegion(curves)
ZoomAll
End Sub为什么??]
我有自己编了个程序来记录图元时发现也是没有删除原来用来创建region的图元??
explode也有同样的问题!!
|
|