'删除图层上所有对象
Function DelAllInLayer(ByVal LName As String)
'On Error Resume Next
Dim SSet As AcadSelectionSet
Set SSet = CreateSelectionSet("XXX")
Dim Ft(0) As Integer, Fd(0)
Ft(0) = 8: Fd(0) = LName
SSet.Select acSelectionSetAll, , , Ft, Fd
Dim E As AcadEntity
MsgBox SSet.Count
For Each E In SSet
E.Delete
Next
End Function
Function DelAllInLayer(ByVal LName As String)
'On Error Resume Next
Dim SSet As AcadSelectionSet
Set SSet = CreateSelectionSet("XXX")
Dim Ft(0) As Integer, Fd(0)
Ft(0) = 8: Fd(0) = LName
SSet.Select acSelectionSetAll, , , Ft, Fd
Dim E As AcadEntity
MsgBox SSet.Count
For Each E In SSet
E.Delete
Next
End Function
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |