Filter out the blocks that belong to xrefs

Discussion in 'AutoCAD' started by mgrigoriev, Apr 2, 2004.

  1. mgrigoriev

    mgrigoriev Guest

    How can I filter out the blocks that belong to xrefs? The following code will give me all blocks, including the xref ones.

    For i = 0 To ThisDrawing.Blocks.count - 1
    If Left(ThisDrawing.Blocks.Item(i).Name, 1) <> "*" Then
    ListBox1.AddItem ThisDrawing.Blocks.Item(i).Name
    End If
    Next i

    Thank you,
    Mike
     
    mgrigoriev, Apr 2, 2004
    #1
  2. mgrigoriev

    Jeff Mishler Guest

    If Left(ThisDrawing.Blocks.Item(i).Name, 1) <> "*" And
    Not ThisDrawing.Blocks.Item(i).Name Like "*|*" Then

    HTH,
    Jeff

    will give me all blocks, including the xref ones.
     
    Jeff Mishler, Apr 2, 2004
    #2
  3. mgrigoriev

    mgrigoriev Guest

    Thanks a lot
     
    mgrigoriev, Apr 2, 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.