Select XData Filtering Trouble

Discussion in 'AutoCAD' started by TomD, Sep 8, 2004.

  1. TomD

    TomD Guest

    The following lisp, at the command line, returns 8 objects (expected):

    (ssget "X" '((-3 ("TLDsFancyObjectNamer"))))

    However, the following VBA code returns none. It would seem that no matter
    how I try this, I cannot get expected, or even consistent results when
    passing XData filters. Am I misssing something obvious?

    Sub TestMe()
    Dim oSet As AcadSelectionSet, vCod(0) As Integer, vVal(0) As Variant
    vCod(0) = 1001
    'vVal(0) = "TLDsFancyObjectNamer"
    vVal(0) = "*"

    'On Error Resume Next
    With ThisDrawing
    .SelectionSets("TestMe").Delete
    Set oSet = .SelectionSets.Add("TestMe")
    End With
    On Error GoTo 0

    Debug.Print oSet.Count & " objects found"
    Set oSet = Nothing

    End Sub
     
    TomD, Sep 8, 2004
    #1
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.