Message 1 of 3
Select All Blocks in Drawing.

Not applicable
11-07-2007
07:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've successfully selected all text on a drawing, and used the text for other functions, but I can't seem to select all blocks. Am I using the wrong filter codes?
'This Works for the Text
Set TextSS = ThisDrawing.SelectionSets.Add("TextSS")
TextSS.Clear
fType(0) = 0: fData(0) = "TEXT"
fType(1) = 67: fData(1) = "0"
TextSS.Select acSelectionSetAll, , , fType, fData
'TextSS now holds all TEXT entities in modelspace
Debug.Print TextSS.Count
To get all of the Blocks, I've tried using
fType(0) = 0: fData(0) = "INSERT" 'Get all blocks
fType(1) = -4: fData(1) = "TBS" 'Block Name
fType(3) = -4: fData(3) = "and>"
Thanks for any help 🙂
'This Works for the Text
Set TextSS = ThisDrawing.SelectionSets.Add("TextSS")
TextSS.Clear
fType(0) = 0: fData(0) = "TEXT"
fType(1) = 67: fData(1) = "0"
TextSS.Select acSelectionSetAll, , , fType, fData
'TextSS now holds all TEXT entities in modelspace
Debug.Print TextSS.Count
To get all of the Blocks, I've tried using
fType(0) = 0: fData(0) = "INSERT" 'Get all blocks
fType(1) = -4: fData(1) = "TBS" 'Block Name
fType(3) = -4: fData(3) = "and>"
Thanks for any help 🙂