<?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: Selection Set Filter issue... in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673511#M33644</link>
    <description>&lt;JBOECKER&gt; wrote in message news:5204666@discussion.autodesk.com...&lt;BR /&gt;
Hi! I was trying to select a text object with a selection window using&lt;BR /&gt;
filters. The strange thing is that nothing was being selected unless I first&lt;BR /&gt;
zoomed to that section of the drawing. Why is this?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
you can't select what you can't see&lt;BR /&gt;
:-)&lt;/JBOECKER&gt;</description>
    <pubDate>Tue, 13 Jun 2006 20:22:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-06-13T20:22:47Z</dc:date>
    <item>
      <title>Selection Set Filter issue...</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673509#M33642</link>
      <description>Hi! I was trying to select a text object with a selection window using filters. The strange thing is that nothing was being selected unless I first zoomed to that section of the drawing. Why is this? The line of code "AutoCAD.ZoomWindow BotLeftPt, TopRightPt" is necessary for the selection command to actually select the text with the properties specified by the filter. Here is my code, thanks for any advice:&lt;BR /&gt;
&lt;BR /&gt;
'-----------------------------------------&lt;BR /&gt;
Dim objEnt As AcadEntity&lt;BR /&gt;
Dim objLine As AcadLine&lt;BR /&gt;
Dim objText As AcadText&lt;BR /&gt;
Dim objSelection As AcadSelectionSet&lt;BR /&gt;
Dim objSelAll As AcadSelectionSet&lt;BR /&gt;
Dim TopRightX As Double&lt;BR /&gt;
Dim TopRightY As Double&lt;BR /&gt;
Dim BotLeftX As Double&lt;BR /&gt;
Dim BotLeftY As Double&lt;BR /&gt;
Dim TopRightPt&lt;BR /&gt;
Dim BotLeftPt&lt;BR /&gt;
&lt;BR /&gt;
Dim gpCode(0) As Integer&lt;BR /&gt;
Dim dataValue(0) As Variant&lt;BR /&gt;
Dim fType&lt;BR /&gt;
Dim fData&lt;BR /&gt;
&lt;BR /&gt;
Dim strLine As String&lt;BR /&gt;
&lt;BR /&gt;
gpCode(0) = 8&lt;BR /&gt;
dataValue(0) = "Map Numbers"&lt;BR /&gt;
    &lt;BR /&gt;
Dim groupCode As Variant, dataCode As Variant&lt;BR /&gt;
fType = gpCode&lt;BR /&gt;
fData = dataValue&lt;BR /&gt;
&lt;BR /&gt;
Me.Hide&lt;BR /&gt;
&lt;BR /&gt;
'Open file for output&lt;BR /&gt;
Open "C:\Tmp\Grids.txt" For Output As #1&lt;BR /&gt;
strLine = "Map No." &amp;amp; vbTab &amp;amp; "TopRightX" &amp;amp; vbTab &amp;amp; "TopRightY" &amp;amp; vbTab &amp;amp; _&lt;BR /&gt;
    "BottomLeftX" &amp;amp; vbTab &amp;amp; "BottomLeftY"&lt;BR /&gt;
Print #1, strLine&lt;BR /&gt;
&lt;BR /&gt;
'Select all objects&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
ThisDrawing.SelectionSets("SELALL").Delete&lt;BR /&gt;
Set objSelAll = ThisDrawing.SelectionSets.Add("SELALL")&lt;BR /&gt;
objSelAll.Select acSelectionSetAll&lt;BR /&gt;
&lt;BR /&gt;
'Prepare object selection set&lt;BR /&gt;
ThisDrawing.SelectionSets("SELTEXT").Delete&lt;BR /&gt;
Set objSelection = ThisDrawing.SelectionSets.Add("SELTEXT")&lt;BR /&gt;
&lt;BR /&gt;
On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
'Loop through each line in drawing&lt;BR /&gt;
For Each objEnt In objSelAll&lt;BR /&gt;
    &lt;BR /&gt;
    If TypeOf objEnt Is AcadLine Then&lt;BR /&gt;
        Set objLine = objEnt&lt;BR /&gt;
    &lt;BR /&gt;
        'Get TopRight and BottomLeft points&lt;BR /&gt;
        BotLeftPt = objLine.StartPoint&lt;BR /&gt;
        TopRightPt = objLine.EndPoint&lt;BR /&gt;
    &lt;BR /&gt;
        'Assign point variables their values&lt;BR /&gt;
        TopRightX = Round(TopRightPt(0), 0)&lt;BR /&gt;
        TopRightY = Round(TopRightPt(1), 0)&lt;BR /&gt;
        BotLeftX = Round(BotLeftPt(0), 0)&lt;BR /&gt;
        BotLeftY = Round(BotLeftPt(1), 0)&lt;BR /&gt;
        &lt;BR /&gt;
        AutoCAD.ZoomWindow BotLeftPt, TopRightPt&lt;BR /&gt;
    &lt;BR /&gt;
        'Select map number text&lt;BR /&gt;
        objSelection.Select acSelectionSetCrossing, BotLeftPt, TopRightPt, fType, fData&lt;BR /&gt;
        &lt;BR /&gt;
        'Set objText to refer to map number text&lt;BR /&gt;
        Set objText = objSelection.Item(0)&lt;BR /&gt;
    &lt;BR /&gt;
        'Print gathered data to output file&lt;BR /&gt;
        strLine = objText.TextString &amp;amp; vbTab &amp;amp; TopRightX &amp;amp; vbTab &amp;amp; TopRightY &amp;amp; vbTab &amp;amp; _&lt;BR /&gt;
            BotLeftX &amp;amp; vbTab &amp;amp; BotLeftY&lt;BR /&gt;
        Print #1, strLine&lt;BR /&gt;
        &lt;BR /&gt;
        objSelection.Clear&lt;BR /&gt;
        &lt;BR /&gt;
    End If&lt;BR /&gt;
    &lt;BR /&gt;
Next&lt;BR /&gt;
&lt;BR /&gt;
objSelAll.Clear&lt;BR /&gt;
ThisDrawing.SelectionSets("SELALL").Delete&lt;BR /&gt;
ThisDrawing.SelectionSets("SELTEXT").Delete&lt;BR /&gt;
&lt;BR /&gt;
Close #1&lt;BR /&gt;
&lt;BR /&gt;
Me.Show&lt;BR /&gt;
'-----------------------------------------</description>
      <pubDate>Tue, 13 Jun 2006 18:03:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673509#M33642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-13T18:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Set Filter issue...</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673510#M33643</link>
      <description>Dunno why my post looks funny at the bottom, sorry about that.</description>
      <pubDate>Tue, 13 Jun 2006 18:04:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673510#M33643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-13T18:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Set Filter issue...</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673511#M33644</link>
      <description>&lt;JBOECKER&gt; wrote in message news:5204666@discussion.autodesk.com...&lt;BR /&gt;
Hi! I was trying to select a text object with a selection window using&lt;BR /&gt;
filters. The strange thing is that nothing was being selected unless I first&lt;BR /&gt;
zoomed to that section of the drawing. Why is this?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
you can't select what you can't see&lt;BR /&gt;
:-)&lt;/JBOECKER&gt;</description>
      <pubDate>Tue, 13 Jun 2006 20:22:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673511#M33644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-13T20:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Set Filter issue...</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673512#M33645</link>
      <description>"MP" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:5204917@discussion.autodesk.com...&lt;BR /&gt;
you can't select what you can't see&lt;BR /&gt;
:-)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Except when using acSelectionSetAll.....&lt;/NOSPAM&gt;</description>
      <pubDate>Tue, 13 Jun 2006 20:30:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selection-set-filter-issue/m-p/1673512#M33645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-13T20:30:14Z</dc:date>
    </item>
  </channel>
</rss>

