<?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: SelectOnScreen VBA in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617742#M35110</link>
    <description>Hi Bernard,&lt;BR /&gt;
Sorry for my inattention...&lt;BR /&gt;
I shall help you tomorrow, now is too later for me&lt;BR /&gt;
Btw, I am from Russia&lt;BR /&gt;
&lt;BR /&gt;
Have a good one&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
    <pubDate>Wed, 19 Apr 2006 20:27:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-04-19T20:27:22Z</dc:date>
    <item>
      <title>SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617737#M35105</link>
      <description>Hello,&lt;BR /&gt;
with VBA i use the SelectOnScreen method&lt;BR /&gt;
Is it possible to know the two points clicked if the user select with "window" &lt;BR /&gt;
or "crossing"?&lt;BR /&gt;
Thank you&lt;BR /&gt;
-- &lt;BR /&gt;
Bernard Flavignard</description>
      <pubDate>Wed, 19 Apr 2006 17:30:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617737#M35105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T17:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617738#M35106</link>
      <description>Hi Bernard&lt;BR /&gt;
&lt;BR /&gt;
Load the code from this link:&lt;BR /&gt;
http://www.apress.com/book/supplementDownload.html?bID=242&amp;amp;sID=1577&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Wed, 19 Apr 2006 18:39:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617738#M35106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T18:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617739#M35107</link>
      <description>Thank Fatty,&lt;BR /&gt;
I found this&lt;BR /&gt;
&lt;BR /&gt;
Public Sub TestSelectOnScreen()&lt;BR /&gt;
Dim objSS As AcadSelectionSet&lt;BR /&gt;
&lt;BR /&gt;
On Error GoTo Done&lt;BR /&gt;
    With ThisDrawing.Utility&lt;BR /&gt;
&lt;BR /&gt;
        '' create a new selectionset&lt;BR /&gt;
        Set objSS = ThisDrawing.SelectionSets.Add("TestSelectOnScreen")&lt;BR /&gt;
&lt;BR /&gt;
        '' let user select entities interactively&lt;BR /&gt;
        objSS.SelectOnScreen&lt;BR /&gt;
&lt;BR /&gt;
-----------------------------&lt;BR /&gt;
Here i want to know the 2 points clicked if user choose Windows or crossing by &lt;BR /&gt;
clicking only a rectangle&lt;BR /&gt;
----------------------------&lt;BR /&gt;
        '' highlight the selected entities&lt;BR /&gt;
        objSS.Highlight True&lt;BR /&gt;
&lt;BR /&gt;
        '' pause for the user&lt;BR /&gt;
        .Prompt vbCr &amp;amp; objSS.Count &amp;amp; " entities selected"&lt;BR /&gt;
        .GetString False, vbLf &amp;amp; "Enter to continue "&lt;BR /&gt;
&lt;BR /&gt;
        '' dehighlight the entities&lt;BR /&gt;
        objSS.Highlight False&lt;BR /&gt;
&lt;BR /&gt;
    End With&lt;BR /&gt;
&lt;BR /&gt;
Done:&lt;BR /&gt;
&lt;BR /&gt;
    '' if the selection was created, delete it&lt;BR /&gt;
    If Not objSS Is Nothing Then&lt;BR /&gt;
        objSS.Delete&lt;BR /&gt;
    End If&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Bernard Flavignard&lt;BR /&gt;
&lt;BR /&gt;
&lt;FATTY&gt; a écrit dans le message de news: 5147727@discussion.autodesk.com...&lt;BR /&gt;
Hi Bernard&lt;BR /&gt;
&lt;BR /&gt;
Load the code from this link:&lt;BR /&gt;
http://www.apress.com/book/supplementDownload.html?bID=242&amp;amp;sID=1577&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;/FATTY&gt;</description>
      <pubDate>Wed, 19 Apr 2006 19:09:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617739#M35107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T19:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617740#M35108</link>
      <description>Happy to help&lt;BR /&gt;
&lt;BR /&gt;
Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Wed, 19 Apr 2006 19:41:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617740#M35108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T19:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617741#M35109</link>
      <description>I am French, and i dont understand all you say in english....&lt;BR /&gt;
My question in the code.... i have the book.&lt;BR /&gt;
&lt;BR /&gt;
        '' let user select entities interactively&lt;BR /&gt;
        objSS.SelectOnScreen&lt;BR /&gt;
&lt;BR /&gt;
-----------------------------&lt;BR /&gt;
Here i want to know the 2 points clicked if user choose Windows or crossing by&lt;BR /&gt;
clicking only a rectangle&lt;BR /&gt;
----------------------------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Bernard Flavignard&lt;BR /&gt;
&lt;BR /&gt;
&lt;FATTY&gt; a écrit dans le message de news: 5147862@discussion.autodesk.com...&lt;BR /&gt;
Happy to help&lt;BR /&gt;
&lt;BR /&gt;
Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;/FATTY&gt;</description>
      <pubDate>Wed, 19 Apr 2006 20:16:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617741#M35109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T20:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617742#M35110</link>
      <description>Hi Bernard,&lt;BR /&gt;
Sorry for my inattention...&lt;BR /&gt;
I shall help you tomorrow, now is too later for me&lt;BR /&gt;
Btw, I am from Russia&lt;BR /&gt;
&lt;BR /&gt;
Have a good one&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Wed, 19 Apr 2006 20:27:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617742#M35110</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T20:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617743#M35111</link>
      <description>Okay, see this example but very quick and dirty...&lt;BR /&gt;
&lt;BR /&gt;
[code]&lt;BR /&gt;
Sub Example_SelectBy_Window()&lt;BR /&gt;
    ' This example adds members to a selection set  by window&lt;BR /&gt;
    Dim objnewss As AcadSelectionSet&lt;BR /&gt;
    Dim objSelColl As AcadSelectionSets&lt;BR /&gt;
    Dim fstCorner, sndCorner As Variant&lt;BR /&gt;
  With ThisDrawing&lt;BR /&gt;
    Set objSelColl = .SelectionSets&lt;BR /&gt;
    For Each objnewss In objSelColl&lt;BR /&gt;
      If objnewss.Name = "$TestSset$" Then&lt;BR /&gt;
        objSelColl.Item("$TestSset$").Delete&lt;BR /&gt;
        Exit For&lt;BR /&gt;
      End If&lt;BR /&gt;
    Next objnewss&lt;BR /&gt;
    Set objnewss = objSelColl.Add("$TestSset$")&lt;BR /&gt;
    fstCorner = .Utility.GetPoint(, "Enter first corner of window")&lt;BR /&gt;
    sndCorner = .Utility.GetCorner(fstCorner, "Enter opposite corner of window")&lt;BR /&gt;
  &lt;BR /&gt;
    Dim mode As Integer&lt;BR /&gt;
&lt;BR /&gt;
    mode = acSelectionSetWindow&lt;BR /&gt;
    ' another mode you can use:&lt;BR /&gt;
    'acSelectionSetCrossing&lt;BR /&gt;
    objnewss.Select mode, fstCorner, sndCorner&lt;BR /&gt;
    objnewss.Highlight True&lt;BR /&gt;
&lt;BR /&gt;
'' pause for the user&lt;BR /&gt;
.Utility.Prompt vbCr &amp;amp; objnewss.Count &amp;amp; " entities selected"&lt;BR /&gt;
.Utility.GetString False, vbLf &amp;amp; "Enter to continue "&lt;BR /&gt;
&lt;BR /&gt;
'' dehighlight the entities&lt;BR /&gt;
objnewss.Highlight False&lt;BR /&gt;
End With&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
MsgBox ("First corner : " &amp;amp; vbCrLf &amp;amp; _&lt;BR /&gt;
"X: " &amp;amp; CStr(fstCorner(0)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Y: " &amp;amp; CStr(fstCorner(1)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Z: " &amp;amp; CStr(fstCorner(2)))&lt;BR /&gt;
MsgBox ("Second corner : " &amp;amp; vbCrLf &amp;amp; _&lt;BR /&gt;
"X: " &amp;amp; CStr(sndCorner(0)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Y: " &amp;amp; CStr(sndCorner(1)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Z: " &amp;amp; CStr(sndCorner(2)))&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;BR /&gt;
[/code]

Message was edited by: Fatty</description>
      <pubDate>Wed, 19 Apr 2006 21:00:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617743#M35111</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T21:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: SelectOnScreen VBA</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617744#M35112</link>
      <description>Fatty,&lt;BR /&gt;
Excuse me, but it is not what i want.&lt;BR /&gt;
I want to program only&lt;BR /&gt;
&lt;BR /&gt;
 objSS.SelectOnScreen&lt;BR /&gt;
&lt;BR /&gt;
-----------------------------&lt;BR /&gt;
Here i want to know the 2 points clicked if user choose Windows or crossing by&lt;BR /&gt;
clicking only a rectangle, not choose W ot C&lt;BR /&gt;
----------------------------&lt;BR /&gt;
&lt;BR /&gt;
I do not want&lt;BR /&gt;
&lt;BR /&gt;
    fstCorner = .Utility.GetPoint(, "Enter first corner of window")&lt;BR /&gt;
    sndCorner = .Utility.GetCorner(fstCorner, "Enter opposite corner of window")&lt;BR /&gt;
&lt;BR /&gt;
Sorry&lt;BR /&gt;
-- &lt;BR /&gt;
Bernard Flavignard&lt;BR /&gt;
&lt;BR /&gt;
&lt;FATTY&gt; a écrit dans le message de news: 5148003@discussion.autodesk.com...&lt;BR /&gt;
Okay, see this example but very quick and dirty...&lt;BR /&gt;
&lt;BR /&gt;
[code]&lt;BR /&gt;
Sub Example_SelectBy_Window()&lt;BR /&gt;
    ' This example adds members to a selection set  by window&lt;BR /&gt;
    Dim objnewss As AcadSelectionSet&lt;BR /&gt;
    Dim objSelColl As AcadSelectionSets&lt;BR /&gt;
    Dim fstCorner, sndCorner As Variant&lt;BR /&gt;
  With ThisDrawing&lt;BR /&gt;
    Set objSelColl = .SelectionSets&lt;BR /&gt;
    For Each objnewss In objSelColl&lt;BR /&gt;
      If objnewss.Name = "$TestSset$" Then&lt;BR /&gt;
        objSelColl.Item("$TestSset$").Delete&lt;BR /&gt;
        Exit For&lt;BR /&gt;
      End If&lt;BR /&gt;
    Next objnewss&lt;BR /&gt;
    Set objnewss = objSelColl.Add("$TestSset$")&lt;BR /&gt;
    fstCorner = .Utility.GetPoint(, "Enter first corner of window")&lt;BR /&gt;
    sndCorner = .Utility.GetCorner(fstCorner, "Enter opposite corner of window")&lt;BR /&gt;
&lt;BR /&gt;
    Dim mode As Integer&lt;BR /&gt;
&lt;BR /&gt;
    mode = acSelectionSetWindow&lt;BR /&gt;
    ' another mode you can use:&lt;BR /&gt;
    'acSelectionSetCrossing&lt;BR /&gt;
    objnewss.Select mode, fstCorner, sndCorner&lt;BR /&gt;
    objnewss.Highlight True&lt;BR /&gt;
&lt;BR /&gt;
'' pause for the user&lt;BR /&gt;
.Utility.Prompt vbCr &amp;amp; objnewss.Count &amp;amp; " entities selected"&lt;BR /&gt;
.Utility.GetString False, vbLf &amp;amp; "Enter to continue "&lt;BR /&gt;
&lt;BR /&gt;
'' dehighlight the entities&lt;BR /&gt;
objnewss.Highlight False&lt;BR /&gt;
End With&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
MsgBox ("First corner : " &amp;amp; vbCrLf &amp;amp; _&lt;BR /&gt;
"X: " &amp;amp; CStr(fstCorner(0)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Y: " &amp;amp; CStr(fstCorner(1)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Z: " &amp;amp; CStr(fstCorner(2)))&lt;BR /&gt;
MsgBox ("Second corner : " &amp;amp; vbCrLf &amp;amp; _&lt;BR /&gt;
"X: " &amp;amp; CStr(sndCorner(0)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Y: " &amp;amp; CStr(sndCorner(1)) &amp;amp; vbCr &amp;amp; _&lt;BR /&gt;
"Z: " &amp;amp; CStr(sndCorner(2)))&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Fatty&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Fatty&lt;/FATTY&gt;</description>
      <pubDate>Wed, 19 Apr 2006 21:38:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectonscreen-vba/m-p/1617744#M35112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-19T21:38:34Z</dc:date>
    </item>
  </channel>
</rss>

