Empty Void Null Selection Set

Discussion in 'AutoCAD' started by ndog, Sep 3, 2004.

  1. ndog

    ndog Guest

    How do you test if the Selection Set contains anything nothing

    In particular:

    Dim oEnt As AcadEntity
    For Each oEnt In ThisDrawing.ActiveSelectionSet
    Process (oEnt)
    Next

    I get an error if there is nothing in the active selection set
    I can't do
    ThisDrawing.ActiveSelectionSet.Count
    Because it also causes an error.

    Thanks!
    Nathan
     
    ndog, Sep 3, 2004
    #1
  2. Hi,

    While stepping through your code hold the cursor over the selection set and
    you will see its current value - or nothing if it holds data. Or do a quick
    view of it.

    You could decide to let the error occur and deal with it by using an "on
    error resume next"


    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au


    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au
     
    Laurie Comerford, Sep 3, 2004
    #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.