Message 1 of 1
Delete all entities on layer XXXX

Not applicable
06-15-2005
06:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is this the most appropriate way to see if a layer exists and if so, to delete the enetities on it?
' Delete all entities on specified layer
Public Sub DeleteLayer(strLayer As String)
Dim ssObjects As AcadSelectionSet
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
FilterType(0) = 8
FilterData(0) = strLayer
Set ssObjects = CreateSelectionSet("SS_TEMPS_SSET")
Call ssObjects.Select(Mode:=acSelectionSetAll, _
FilterType:=FilterType, FilterData:=FilterData)
If ssObjects.Count > 0 Then
ssObjects.Erase
End If
End Sub
It works fine. Just checking.
Andrew
' Delete all entities on specified layer
Public Sub DeleteLayer(strLayer As String)
Dim ssObjects As AcadSelectionSet
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
FilterType(0) = 8
FilterData(0) = strLayer
Set ssObjects = CreateSelectionSet("SS_TEMPS_SSET")
Call ssObjects.Select(Mode:=acSelectionSetAll, _
FilterType:=FilterType, FilterData:=FilterData)
If ssObjects.Count > 0 Then
ssObjects.Erase
End If
End Sub
It works fine. Just checking.
Andrew