<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Filtered Selection Sets in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337612#M85581</link>
    <description>This is the key line:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&lt;BR /&gt;
The fType data are the integers that correspond to the dxf-style codes&lt;BR /&gt;
listed in the DXF reference on-line help. To get all closed plines, you&lt;BR /&gt;
would use:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fType, fData, 0, "POLYLINE,LWPOLYLINE", 70, 1&lt;BR /&gt;
&lt;BR /&gt;
BTW, Frank, how would this handle bit coded values such as the 70 group?&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
http://www.acadx.com&lt;BR /&gt;
Win a free autographed copy of&lt;BR /&gt;
"Mastering AutoCAD 2000 Objects"&lt;BR /&gt;
by Dietmar Rudolph&lt;BR /&gt;
&lt;BR /&gt;
"Rob Outman" &lt;ROUTMAN&gt; wrote in message&lt;BR /&gt;
news:2A0226F0AD9DEDD1E2EBF01C5AEDD964@in.WebX.maYIadrTaRb...&lt;BR /&gt;
| Hi All,&lt;BR /&gt;
|&lt;BR /&gt;
| Frank Oquendo was kind enough to send me code for a filtered selection&lt;BR /&gt;
set. (see below) My question follows the code.&lt;BR /&gt;
|&lt;BR /&gt;
| Public Sub BuildFilter(typeArray, dataArray, ParamArray gCodes())&lt;BR /&gt;
|&lt;BR /&gt;
|     Dim fType() As Integer, fData()&lt;BR /&gt;
|     Dim index As Long, I As Long&lt;BR /&gt;
|&lt;BR /&gt;
|     index = LBound(gCodes) - 1&lt;BR /&gt;
|&lt;BR /&gt;
|     For I = LBound(gCodes) To UBound(gCodes) Step 2&lt;BR /&gt;
|         index = index + 1&lt;BR /&gt;
|         ReDim Preserve fType(0 To index)&lt;BR /&gt;
|         ReDim Preserve fData(0 To index)&lt;BR /&gt;
|         fType(index) = CInt(gCodes(I))&lt;BR /&gt;
|         fData(index) = gCodes(I + 1)&lt;BR /&gt;
|     Next&lt;BR /&gt;
|     typeArray = fType: dataArray = fData&lt;BR /&gt;
|&lt;BR /&gt;
| End Sub&lt;BR /&gt;
|&lt;BR /&gt;
| With ThisDrawing.Utility&lt;BR /&gt;
|     Set ss = CreateSelectionSet()&lt;BR /&gt;
|     BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
|     ss.Select acSelectionSetAll, , , fType, fData&lt;BR /&gt;
|     .Prompt vbCr &amp;amp; "There are " &amp;amp; ss.Count &amp;amp; " Roomtags in this drawing."&lt;BR /&gt;
| End With&lt;BR /&gt;
|&lt;BR /&gt;
| I am wondering if it is possible to use this same filter to search for all&lt;BR /&gt;
| instances of other entities beyond blocks.  I am assuming it has something&lt;BR /&gt;
| to do with the dataArray and gCodes.  Is that right or am I way off.  If&lt;BR /&gt;
| this is correct, are there lists for each type of entity and if so where&lt;BR /&gt;
can&lt;BR /&gt;
| I find them.  I am trying to search for all closed polylines.&lt;BR /&gt;
|&lt;BR /&gt;
| Thanx,&lt;BR /&gt;
|&lt;BR /&gt;
| Rob&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;/ROUTMAN&gt;</description>
    <pubDate>Tue, 03 Apr 2001 16:23:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2001-04-03T16:23:08Z</dc:date>
    <item>
      <title>Filtered Selection Sets</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337611#M85580</link>
      <description>&lt;DIV&gt;Hi All,&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;Frank Oquendo was kind enough to send me code for a filtered selection set. &lt;BR /&gt;
(see below) My question follows the code.&lt;BR /&gt;&lt;BR /&gt;Public Sub &lt;BR /&gt;
BuildFilter(typeArray, dataArray, ParamArray gCodes())&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Dim fType() As Integer, fData()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim index As Long, I As &lt;BR /&gt;
Long&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; index = LBound(gCodes) - &lt;BR /&gt;
1&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For I = LBound(gCodes) To UBound(gCodes) Step &lt;BR /&gt;
2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index = index + &lt;BR /&gt;
1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReDim Preserve fType(0 To &lt;BR /&gt;
index)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ReDim Preserve fData(0 To &lt;BR /&gt;
index)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fType(index) = &lt;BR /&gt;
CInt(gCodes(I))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fData(index) = &lt;BR /&gt;
gCodes(I + 1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeArray = &lt;BR /&gt;
fType: dataArray = fData&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;With ThisDrawing.Utility&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set ss = &lt;BR /&gt;
CreateSelectionSet()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BuildFilter fType, fData, 0, &lt;BR /&gt;
"INSERT", 2, "ROOMTAG"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ss.Select acSelectionSetAll, , , &lt;BR /&gt;
fType, fData&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.Prompt vbCr &amp;amp; "There are " &amp;amp; &lt;BR /&gt;
ss.Count &amp;amp; " Roomtags in this drawing."&lt;BR /&gt;End With&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;I am wondering if it is possible to use this same filter to search for &lt;BR /&gt;
all&lt;BR /&gt;instances of other entities beyond blocks.&amp;nbsp; I am assuming it has &lt;BR /&gt;
something&lt;BR /&gt;to do with the dataArray and gCodes.&amp;nbsp; Is that right or am I &lt;BR /&gt;
way off.&amp;nbsp; If&lt;BR /&gt;this is correct, are there lists for each type of entity &lt;BR /&gt;
and if so where can&lt;BR /&gt;I find them.&amp;nbsp; I am trying to search for all closed &lt;BR /&gt;
polylines.&lt;BR /&gt;&lt;BR /&gt;Thanx,&lt;BR /&gt;&lt;BR /&gt;Rob&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Apr 2001 15:36:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337611#M85580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-03T15:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Filtered Selection Sets</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337612#M85581</link>
      <description>This is the key line:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&lt;BR /&gt;
The fType data are the integers that correspond to the dxf-style codes&lt;BR /&gt;
listed in the DXF reference on-line help. To get all closed plines, you&lt;BR /&gt;
would use:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fType, fData, 0, "POLYLINE,LWPOLYLINE", 70, 1&lt;BR /&gt;
&lt;BR /&gt;
BTW, Frank, how would this handle bit coded values such as the 70 group?&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
http://www.acadx.com&lt;BR /&gt;
Win a free autographed copy of&lt;BR /&gt;
"Mastering AutoCAD 2000 Objects"&lt;BR /&gt;
by Dietmar Rudolph&lt;BR /&gt;
&lt;BR /&gt;
"Rob Outman" &lt;ROUTMAN&gt; wrote in message&lt;BR /&gt;
news:2A0226F0AD9DEDD1E2EBF01C5AEDD964@in.WebX.maYIadrTaRb...&lt;BR /&gt;
| Hi All,&lt;BR /&gt;
|&lt;BR /&gt;
| Frank Oquendo was kind enough to send me code for a filtered selection&lt;BR /&gt;
set. (see below) My question follows the code.&lt;BR /&gt;
|&lt;BR /&gt;
| Public Sub BuildFilter(typeArray, dataArray, ParamArray gCodes())&lt;BR /&gt;
|&lt;BR /&gt;
|     Dim fType() As Integer, fData()&lt;BR /&gt;
|     Dim index As Long, I As Long&lt;BR /&gt;
|&lt;BR /&gt;
|     index = LBound(gCodes) - 1&lt;BR /&gt;
|&lt;BR /&gt;
|     For I = LBound(gCodes) To UBound(gCodes) Step 2&lt;BR /&gt;
|         index = index + 1&lt;BR /&gt;
|         ReDim Preserve fType(0 To index)&lt;BR /&gt;
|         ReDim Preserve fData(0 To index)&lt;BR /&gt;
|         fType(index) = CInt(gCodes(I))&lt;BR /&gt;
|         fData(index) = gCodes(I + 1)&lt;BR /&gt;
|     Next&lt;BR /&gt;
|     typeArray = fType: dataArray = fData&lt;BR /&gt;
|&lt;BR /&gt;
| End Sub&lt;BR /&gt;
|&lt;BR /&gt;
| With ThisDrawing.Utility&lt;BR /&gt;
|     Set ss = CreateSelectionSet()&lt;BR /&gt;
|     BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
|     ss.Select acSelectionSetAll, , , fType, fData&lt;BR /&gt;
|     .Prompt vbCr &amp;amp; "There are " &amp;amp; ss.Count &amp;amp; " Roomtags in this drawing."&lt;BR /&gt;
| End With&lt;BR /&gt;
|&lt;BR /&gt;
| I am wondering if it is possible to use this same filter to search for all&lt;BR /&gt;
| instances of other entities beyond blocks.  I am assuming it has something&lt;BR /&gt;
| to do with the dataArray and gCodes.  Is that right or am I way off.  If&lt;BR /&gt;
| this is correct, are there lists for each type of entity and if so where&lt;BR /&gt;
can&lt;BR /&gt;
| I find them.  I am trying to search for all closed polylines.&lt;BR /&gt;
|&lt;BR /&gt;
| Thanx,&lt;BR /&gt;
|&lt;BR /&gt;
| Rob&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;/ROUTMAN&gt;</description>
      <pubDate>Tue, 03 Apr 2001 16:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337612#M85581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-03T16:23:08Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337613#M85582</link>
      <description>&amp;gt; BTW, Frank, how would this handle bit coded values such as the 70&lt;BR /&gt;
group?&lt;BR /&gt;
&lt;BR /&gt;
I came across this little gem looking through VisualLISP help on&lt;BR /&gt;
selection set filters:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fTpe, fData, 0 , "LWPOLYLINE, -4, "&amp;amp;=", 70, 1&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
http://www.acadx.com&lt;BR /&gt;
Win an autographed copy of&lt;BR /&gt;
"Mastering AutoCAD 2000 Objects"&lt;BR /&gt;
by Dietmar Rudolph&lt;BR /&gt;
&lt;BR /&gt;
"R. Robert Bell" &lt;ROBERTB&gt; wrote in message&lt;BR /&gt;
news:41B8F068436C58EFDD24584705845C22@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; This is the key line:&lt;BR /&gt;
&lt;SNIP&gt;&lt;/SNIP&gt;&lt;/ROBERTB&gt;</description>
      <pubDate>Tue, 03 Apr 2001 17:20:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337613#M85582</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-03T17:20:07Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337614#M85583</link>
      <description>Thanx R. Robert Bell. (should I just call you R. kinda like Q. of James Bond&lt;BR /&gt;
fame)&lt;BR /&gt;
&lt;BR /&gt;
Let me see if I am understanding correctly.  fType is searching for a "type"&lt;BR /&gt;
of entity and fData is the properties of that entity.  So, as in the case&lt;BR /&gt;
below:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&lt;BR /&gt;
0 - This represents the block group code?&lt;BR /&gt;
"Insert" - This represents the insert of the block?&lt;BR /&gt;
2 - This represents the block name group code?&lt;BR /&gt;
"Roomtag" - This represents the name of the block to search for?&lt;BR /&gt;
&lt;BR /&gt;
and just to reassure myself that I have it:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter fType, fData, 0, "POLYLINE,LWPOLYLINE", 70, 1&lt;BR /&gt;
&lt;BR /&gt;
0 - ok stumped already.  I could not find a 0 group code in Lwpolyline or&lt;BR /&gt;
Polyline what is this? (maybe the ) (zero) from above is not for the block&lt;BR /&gt;
group code?&lt;BR /&gt;
Polyline,Lwpolyline - This represents all Lightweight polys and all polys&lt;BR /&gt;
70 - This represents the polyline flag group code&lt;BR /&gt;
1- This represents all closed polys&lt;BR /&gt;
&lt;BR /&gt;
Ok, please tell me if I am way off or if I am on the right track.&lt;BR /&gt;
&lt;BR /&gt;
How detailed can you get with a filter.  For example:&lt;BR /&gt;
If I wanted to search for all closed polylines on the "poly" layer that are&lt;BR /&gt;
less than 100 SF in area.&lt;BR /&gt;
&lt;BR /&gt;
Is it possible to go to this detail, and if so how would you format it?&lt;BR /&gt;
&lt;BR /&gt;
Thanx again,&lt;BR /&gt;
&lt;BR /&gt;
Rob&lt;BR /&gt;
&lt;BR /&gt;
"R. Robert Bell" &lt;ROBERTB&gt; wrote in message&lt;BR /&gt;
news:41B8F068436C58EFDD24584705845C22@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; This is the key line:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The fType data are the integers that correspond to the dxf-style codes&lt;BR /&gt;
&amp;gt; listed in the DXF reference on-line help. To get all closed plines, you&lt;BR /&gt;
&amp;gt; would use:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; BuildFilter fType, fData, 0, "POLYLINE,LWPOLYLINE", 70, 1&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; BTW, Frank, how would this handle bit coded values such as the 70 group?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; http://www.acadx.com&lt;BR /&gt;
&amp;gt; Win a free autographed copy of&lt;BR /&gt;
&amp;gt; "Mastering AutoCAD 2000 Objects"&lt;BR /&gt;
&amp;gt; by Dietmar Rudolph&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Rob Outman" &lt;ROUTMAN&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:2A0226F0AD9DEDD1E2EBF01C5AEDD964@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; | Hi All,&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | Frank Oquendo was kind enough to send me code for a filtered selection&lt;BR /&gt;
&amp;gt; set. (see below) My question follows the code.&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | Public Sub BuildFilter(typeArray, dataArray, ParamArray gCodes())&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; |     Dim fType() As Integer, fData()&lt;BR /&gt;
&amp;gt; |     Dim index As Long, I As Long&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; |     index = LBound(gCodes) - 1&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; |     For I = LBound(gCodes) To UBound(gCodes) Step 2&lt;BR /&gt;
&amp;gt; |         index = index + 1&lt;BR /&gt;
&amp;gt; |         ReDim Preserve fType(0 To index)&lt;BR /&gt;
&amp;gt; |         ReDim Preserve fData(0 To index)&lt;BR /&gt;
&amp;gt; |         fType(index) = CInt(gCodes(I))&lt;BR /&gt;
&amp;gt; |         fData(index) = gCodes(I + 1)&lt;BR /&gt;
&amp;gt; |     Next&lt;BR /&gt;
&amp;gt; |     typeArray = fType: dataArray = fData&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | End Sub&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | With ThisDrawing.Utility&lt;BR /&gt;
&amp;gt; |     Set ss = CreateSelectionSet()&lt;BR /&gt;
&amp;gt; |     BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&amp;gt; |     ss.Select acSelectionSetAll, , , fType, fData&lt;BR /&gt;
&amp;gt; |     .Prompt vbCr &amp;amp; "There are " &amp;amp; ss.Count &amp;amp; " Roomtags in this&lt;BR /&gt;
drawing."&lt;BR /&gt;
&amp;gt; | End With&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | I am wondering if it is possible to use this same filter to search for&lt;BR /&gt;
all&lt;BR /&gt;
&amp;gt; | instances of other entities beyond blocks.  I am assuming it has&lt;BR /&gt;
something&lt;BR /&gt;
&amp;gt; | to do with the dataArray and gCodes.  Is that right or am I way off.  If&lt;BR /&gt;
&amp;gt; | this is correct, are there lists for each type of entity and if so where&lt;BR /&gt;
&amp;gt; can&lt;BR /&gt;
&amp;gt; | I find them.  I am trying to search for all closed polylines.&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | Thanx,&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; | Rob&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt; |&lt;BR /&gt;
&amp;gt;&lt;/ROUTMAN&gt;&lt;/ROBERTB&gt;</description>
      <pubDate>Wed, 04 Apr 2001 08:09:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337614#M85583</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-04T08:09:15Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337615#M85584</link>
      <description>&amp;gt; BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; 0 - This represents the block group code?&lt;BR /&gt;
&amp;gt; "Insert" - This represents the insert of the block?&lt;BR /&gt;
&amp;gt; 2 - This represents the block name group code?&lt;BR /&gt;
&amp;gt; "Roomtag" - This represents the name of the block to search for?&lt;BR /&gt;
&lt;BR /&gt;
That is correct.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; BuildFilter fType, fData, 0, "POLYLINE,LWPOLYLINE", 70, 1&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; 0 - ok stumped already.  I could not find a 0 group code in Lwpolyline or&lt;BR /&gt;
&amp;gt; Polyline what is this? (maybe the ) (zero) from above is not for the block&lt;BR /&gt;
&amp;gt; group code?&lt;BR /&gt;
&lt;BR /&gt;
All entities have a group code 0. It identifies the type of entity.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Polyline,Lwpolyline - This represents all Lightweight polys and all polys&lt;BR /&gt;
&amp;gt; 70 - This represents the polyline flag group code&lt;BR /&gt;
&amp;gt; 1- This represents all closed polys&lt;BR /&gt;
&lt;BR /&gt;
Almost. If you specify 1, only polylines whose group 70 contains 1 will be&lt;BR /&gt;
selected. Normally this isn't a problem but group code 70 is a bit-coded field&lt;BR /&gt;
where multiple options are added together to form a final value. In this&lt;BR /&gt;
example, any closed polylines that also have linetype generation enabled will&lt;BR /&gt;
*not* be selected since group code 70 will be 129 instead of 1.&lt;BR /&gt;
&lt;BR /&gt;
To get around that, use a bitmask:&lt;BR /&gt;
&lt;BR /&gt;
BuildFilter 0, "LWPOLYLINE", -4, "&amp;amp;=", 70, 1&lt;BR /&gt;
&lt;BR /&gt;
This expression selects all polylines whose group code 70 contains, but not&lt;BR /&gt;
necessarily equal to, 1.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; How detailed can you get with a filter.&lt;BR /&gt;
&lt;BR /&gt;
You can get extremely detailed but you are limited to filtering on information&lt;BR /&gt;
contained in the entity's definition data. For example, this is possible:&lt;BR /&gt;
&amp;gt; If I wanted to search for all closed polylines on the "poly" layer&lt;BR /&gt;
&lt;BR /&gt;
but this is not:&lt;BR /&gt;
&amp;gt; If I wanted to search for all closed polylines on the "poly" layer&lt;BR /&gt;
&amp;gt; that are less than 100 SF in area.&lt;BR /&gt;
&lt;BR /&gt;
The reason is that area is not stored with the entity. That's not to say that yu&lt;BR /&gt;
can't start with a set that contains all the closed polys on the poly layer and&lt;BR /&gt;
then weed out those that do not meet your criteria. It just requires additional&lt;BR /&gt;
processing.&lt;BR /&gt;
&lt;BR /&gt;
To learn more about DXF group codes and building complex filters, have a look in&lt;BR /&gt;
the AutoCAD Help file. In specific, be sure to read the DXF Reference. The&lt;BR /&gt;
Entities section give a very detailed list of DXF group codes. Hope this helps.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
http://www.acadx.com&lt;BR /&gt;
Win an autographed copy of&lt;BR /&gt;
"Mastering AutoCAD 2000 Objects"&lt;BR /&gt;
by Dietmar Rudolph&lt;BR /&gt;
&lt;BR /&gt;
"Rob Outman" &lt;ROUTMAN&gt; wrote in message&lt;BR /&gt;
news:CB429D73112D7A7FA5CBC23B6FA3AB24@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&lt;SNIP&gt;&lt;/SNIP&gt;&lt;/ROUTMAN&gt;</description>
      <pubDate>Wed, 04 Apr 2001 08:26:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337615#M85584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-04T08:26:51Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337616#M85585</link>
      <description>Thanx Frank,&lt;BR /&gt;
&lt;BR /&gt;
That helps greatly.&lt;BR /&gt;
&lt;BR /&gt;
Rob&lt;BR /&gt;
&lt;BR /&gt;
"Frank Oquendo" &lt;FRANKO&gt; wrote in message&lt;BR /&gt;
news:94C293BAAFC177AA10DAE14FFF2ABCE8@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; BuildFilter fType, fData, 0, "INSERT", 2, "ROOMTAG"&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; 0 - This represents the block group code?&lt;BR /&gt;
&amp;gt; &amp;gt; "Insert" - This represents the insert of the block?&lt;BR /&gt;
&amp;gt; &amp;gt; 2 - This represents the block name group code?&lt;BR /&gt;
&amp;gt; &amp;gt; "Roomtag" - This represents the name of the block to search for?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; That is correct.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; BuildFilter fType, fData, 0, "POLYLINE,LWPOLYLINE", 70, 1&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; 0 - ok stumped already.  I could not find a 0 group code in Lwpolyline&lt;BR /&gt;
or&lt;BR /&gt;
&amp;gt; &amp;gt; Polyline what is this? (maybe the ) (zero) from above is not for the&lt;BR /&gt;
block&lt;BR /&gt;
&amp;gt; &amp;gt; group code?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; All entities have a group code 0. It identifies the type of entity.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Polyline,Lwpolyline - This represents all Lightweight polys and all&lt;BR /&gt;
polys&lt;BR /&gt;
&amp;gt; &amp;gt; 70 - This represents the polyline flag group code&lt;BR /&gt;
&amp;gt; &amp;gt; 1- This represents all closed polys&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Almost. If you specify 1, only polylines whose group 70 contains 1 will be&lt;BR /&gt;
&amp;gt; selected. Normally this isn't a problem but group code 70 is a bit-coded&lt;BR /&gt;
field&lt;BR /&gt;
&amp;gt; where multiple options are added together to form a final value. In this&lt;BR /&gt;
&amp;gt; example, any closed polylines that also have linetype generation enabled&lt;BR /&gt;
will&lt;BR /&gt;
&amp;gt; *not* be selected since group code 70 will be 129 instead of 1.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; To get around that, use a bitmask:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; BuildFilter 0, "LWPOLYLINE", -4, "&amp;amp;=", 70, 1&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; This expression selects all polylines whose group code 70 contains, but&lt;BR /&gt;
not&lt;BR /&gt;
&amp;gt; necessarily equal to, 1.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; How detailed can you get with a filter.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; You can get extremely detailed but you are limited to filtering on&lt;BR /&gt;
information&lt;BR /&gt;
&amp;gt; contained in the entity's definition data. For example, this is possible:&lt;BR /&gt;
&amp;gt; &amp;gt; If I wanted to search for all closed polylines on the "poly" layer&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; but this is not:&lt;BR /&gt;
&amp;gt; &amp;gt; If I wanted to search for all closed polylines on the "poly" layer&lt;BR /&gt;
&amp;gt; &amp;gt; that are less than 100 SF in area.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The reason is that area is not stored with the entity. That's not to say&lt;BR /&gt;
that yu&lt;BR /&gt;
&amp;gt; can't start with a set that contains all the closed polys on the poly&lt;BR /&gt;
layer and&lt;BR /&gt;
&amp;gt; then weed out those that do not meet your criteria. It just requires&lt;BR /&gt;
additional&lt;BR /&gt;
&amp;gt; processing.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; To learn more about DXF group codes and building complex filters, have a&lt;BR /&gt;
look in&lt;BR /&gt;
&amp;gt; the AutoCAD Help file. In specific, be sure to read the DXF Reference. The&lt;BR /&gt;
&amp;gt; Entities section give a very detailed list of DXF group codes. Hope this&lt;BR /&gt;
helps.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; http://www.acadx.com&lt;BR /&gt;
&amp;gt; Win an autographed copy of&lt;BR /&gt;
&amp;gt; "Mastering AutoCAD 2000 Objects"&lt;BR /&gt;
&amp;gt; by Dietmar Rudolph&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Rob Outman" &lt;ROUTMAN&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:CB429D73112D7A7FA5CBC23B6FA3AB24@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &lt;SNIP&gt;&lt;BR /&gt;
&amp;gt;&lt;/SNIP&gt;&lt;/ROUTMAN&gt;&lt;/FRANKO&gt;</description>
      <pubDate>Wed, 04 Apr 2001 08:46:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337616#M85585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-04T08:46:42Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337617#M85586</link>
      <description>Do'h! Should have thought of that... Grr &lt;VBG&gt;&lt;BR /&gt;
&lt;BR /&gt;
"Frank Oquendo" &lt;FRANKO&gt; wrote in message&lt;BR /&gt;
news:A7E0F7FB9DE4DFFC4E060690C4A7434E@in.WebX.maYIadrTaRb...&lt;BR /&gt;
| &amp;gt; BTW, Frank, how would this handle bit coded values such as the 70&lt;BR /&gt;
| group?&lt;BR /&gt;
|&lt;BR /&gt;
| I came across this little gem looking through VisualLISP help on&lt;BR /&gt;
| selection set filters:&lt;BR /&gt;
|&lt;BR /&gt;
| BuildFilter fTpe, fData, 0 , "LWPOLYLINE, -4, "&amp;amp;=", 70, 1&lt;/FRANKO&gt;&lt;/VBG&gt;</description>
      <pubDate>Wed, 04 Apr 2001 15:37:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/filtered-selection-sets/m-p/337617#M85586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2001-04-04T15:37:10Z</dc:date>
    </item>
  </channel>
</rss>

