Multi block selection set...

Discussion in 'AutoCAD' started by Marty, May 20, 2004.

  1. Marty

    Marty Guest

    How do I build the "filter" for a selection set that can retrieve three
    blocks. I can get all blocks by using:

    Dim oSset As AcadSelectionSet, iFilterType(0 To 0) As Integer,
    vFilterData(0 To 0) As Variant
    iFilterType(0) = 0: vFilterData(0) = "INSERT"
    ....
    oSset.Select acSelectionSetAll, , , iFilterType, vFilterData
    ....

    How do I get specific blocks... BLOCK1 and BLOCK2 and BLOCK3 into the
    filter?

    Thanks,

    Marty
     
    Marty, May 20, 2004
    #1
  2. Dim FType(0 To 1) As Integer
    Dim FData(0 To 1) As Variant

    FType(0) = 0
    FData(0) = "INSERT"

    FType(1) = 2
    FData(1) = "BLOCK1,BLOCK2,BLOCK3,FOO*"

    In the last line, the string may contain any number of items,
    each of which can be the full name of a block, or a wildcard
    pattern that matches the names of multiple blocks. Hence, the
    patter would select all blocks whose names begin with "FOO', or
    any of the three explicit block names (Block1, Block2, Block3).
     
    Tony Tanzillo, May 20, 2004
    #2
  3. Marty

    Marty Guest

    Tony,

    This works perfect!

    Thanks,
    Marty


     
    Marty, May 20, 2004
    #3
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.