Message 1 of 7
Filtered Selection Sets
Not applicable
04-03-2001
08:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
Frank Oquendo was kind enough to send me code for a filtered selection set.
(see below) My question follows the code.
Public Sub
BuildFilter(typeArray, dataArray, ParamArray gCodes())
Dim fType() As Integer, fData()
Dim index As Long, I As
Long
index = LBound(gCodes) -
1
For I = LBound(gCodes) To UBound(gCodes) Step
2
index = index +
1
ReDim Preserve fType(0 To
index)
ReDim Preserve fData(0 To
index)
fType(index) =
CInt(gCodes(I))
fData(index) =
gCodes(I + 1)
Next
typeArray =
fType: dataArray = fData
End Sub
(see below) My question follows the code.
Public Sub
BuildFilter(typeArray, dataArray, ParamArray gCodes())
Dim fType() As Integer, fData()
Dim index As Long, I As
Long
index = LBound(gCodes) -
1
For I = LBound(gCodes) To UBound(gCodes) Step
2
index = index +
1
ReDim Preserve fType(0 To
index)
ReDim Preserve fData(0 To
index)
fType(index) =
CInt(gCodes(I))
fData(index) =
gCodes(I + 1)
Next
typeArray =
fType: dataArray = fData
End Sub
With ThisDrawing.Utility
Set ss =
CreateSelectionSet()
BuildFilter fType, fData, 0,
"INSERT", 2, "ROOMTAG"
ss.Select acSelectionSetAll, , ,
fType, fData
.Prompt vbCr & "There are " &
ss.Count & " Roomtags in this drawing."
End With
Set ss =
CreateSelectionSet()
BuildFilter fType, fData, 0,
"INSERT", 2, "ROOMTAG"
ss.Select acSelectionSetAll, , ,
fType, fData
.Prompt vbCr & "There are " &
ss.Count & " Roomtags in this drawing."
End With
I am wondering if it is possible to use this same filter to search for
all
instances of other entities beyond blocks. I am assuming it has
something
to do with the dataArray and gCodes. Is that right or am I
way off. If
this is correct, are there lists for each type of entity
and if so where can
I find them. I am trying to search for all closed
polylines.
Thanx,
Rob
all
instances of other entities beyond blocks. I am assuming it has
something
to do with the dataArray and gCodes. Is that right or am I
way off. If
this is correct, are there lists for each type of entity
and if so where can
I find them. I am trying to search for all closed
polylines.
Thanx,
Rob