Method 'Add' of of object 'IAcadSelectionSets' failed

Discussion in 'AutoCAD' started by Allen Johnson, Dec 20, 2004.

  1. I get the error:

    Method 'Add' of of object 'IAcadSelectionSets' failed

    at the Set ssText... line in the VBA code below when the previous selection
    set contains text using a TrueType font.
    It works fine if the previous selection set uses shx fonts. Any ideas?
    The previous selection set is created in a lisp routine using

    (if (> (sslength qa_ssgroup) 0)
    (progn
    (command "select" qa_ssgroup "")
    (vl-vbarun "modTextNoteEditorSelectPrev.TextNoteEditorSelectPrev")
    )
    )

    ----------------------------------------------------------------------------
    -------------

    SelectText:
    Err.Clear
    Set ssText = ThisDrawing.SelectionSets.Add(Now)
    If Err.Number <> 0 Then
    ' MsgBox "Sorry, but an error occured when selecting this item." & vbCrLf
    & _
    "Try editing this object with the DDE command instead.", _
    vbOKOnly, "Selection Error:"
    Exit Sub
    End If

    ' Add objects to the selection set
    ssText.Select acSelectionSetPrevious, , , vDxfCode, vDxfValue
     
    Allen Johnson, Dec 20, 2004
    #1
  2. Never mind, it was my lisp routine that overfilled the available selection
    sets.
     
    Allen Johnson, Dec 20, 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.