Nested Blocks Acad 2005

Discussion in 'AutoCAD' started by Jason Roetz, Jul 27, 2004.

  1. Jason Roetz

    Jason Roetz Guest

    Hi All,

    I just installed Acad 2005 and noticed that my VBA code for exploding nested
    blocks no longer works. Basically, I'm exploding all nested blocks in my
    drawing to the third block deep. The code runs with no errors, however, I
    don't get more than the first level block exploded. Can someone verify this
    problem and/or troubleshoot my code for me? The code in question is shown
    below. This code has always worked for me in the past, prior to the 2005
    install.

    Thanks,

    Jason


    Dim objSSet As AcadSelectionSet
    Dim blkEntry As AcadBlockReference
    Dim intFilterType(0) As Integer
    Dim varFilterData(0)
    Dim dummy
    Dim i As Integer


    intFilterType(0) = 0
    varFilterData(0) = "Insert"
    i = 0

    Do Until i = 3
    'explodes all blocks
    Set objSSet = ThisDrawing.SelectionSets.Add("Block")
    objSSet.Select acSelectionSetAll, dummy, dummy, intFilterType, varFilterData
    For Each blkEntry In objSSet
    blkEntry.Explode
    Next blkEntry
    ThisDrawing.SelectionSets.Item("Block").Delete
    i = i + 1
    Loop
     
    Jason Roetz, Jul 27, 2004
    #1
  2. Please see my reply in the original thread.

    --
    R. Robert Bell


    Hi All,

    I just installed Acad 2005 and noticed that my VBA code for exploding nested
    blocks no longer works. Basically, I'm exploding all nested blocks in my
    drawing to the third block deep. The code runs with no errors, however, I
    don't get more than the first level block exploded. Can someone verify this
    problem and/or troubleshoot my code for me? The code in question is shown
    below. This code has always worked for me in the past, prior to the 2005
    install.

    Thanks,

    Jason


    Dim objSSet As AcadSelectionSet
    Dim blkEntry As AcadBlockReference
    Dim intFilterType(0) As Integer
    Dim varFilterData(0)
    Dim dummy
    Dim i As Integer


    intFilterType(0) = 0
    varFilterData(0) = "Insert"
    i = 0

    Do Until i = 3
    'explodes all blocks
    Set objSSet = ThisDrawing.SelectionSets.Add("Block")
    objSSet.Select acSelectionSetAll, dummy, dummy, intFilterType, varFilterData
    For Each blkEntry In objSSet
    blkEntry.Explode
    Next blkEntry
    ThisDrawing.SelectionSets.Item("Block").Delete
    i = i + 1
    Loop
     
    R. Robert Bell, Jul 27, 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.