Check for empty

Discussion in 'AutoCAD' started by anttam, Apr 8, 2005.

  1. anttam

    anttam Guest

    Q1. As I select a specific layer which is empty, how can I check
    (1) the selection set, objSS is empty? Because objSS.count is unable to show the value.
    (2) the layer is empty so that I will not perform the selection?
     
    anttam, Apr 8, 2005
    #1
  2. anttam

    Jürg Menzi Guest

    Hi anttam
    If you create a named selection set you've always a count property:
    Code:
    Public Function MeSelectionSet(SetNme As String) As AcadSelectionSet
    
    On Error Resume Next
    
    With ThisDrawing.SelectionSets
    Set MeSelectionSet = .Add(SetNme)
    If Err.Number <> 0 Then
    Err.Clear
    .Item(SetNme).Delete
    Set MeSelectionSet = .Add(SetNme)
    End If
    End With
    
    End Function
    Check GenerateUsageData method (A2k5+)

    Cheers
     
    Jürg Menzi, Apr 8, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.