Message 1 of 24
Select all block follow insert field text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi all,
I have a block and I use insert field in it. I want to select all blocks with insert field as B1C3.
I have the following code but I don't know how to choose them.
Sub SelectBlocksField()
Dim atts As Variant
Dim AcadObj As AcadObject, BlockRef As AcadBlockReference
Dim att As AcadAttributeReference
Dim ssetObj As AcadSelectionSet
For Each AcadObj In ThisDrawing.ModelSpace
If TypeOf AcadObj Is AcadBlockReference Then
atts = AcadObj.GetAttributes()
For i = 0 To UBound(atts)
Set att = atts(i)
If InStr(1, att.TextString, "B1C3") Then
'Select what ??
End If
Next
End If
Next AcadObj
End Sub