<?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: Window Select/Region is Empty on Inventor Drawing with VBA in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749905#M76595</link>
    <description>&lt;P&gt;Yes, but is there a specific topic you are referring to?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 12:04:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-04-24T12:04:47Z</dc:date>
    <item>
      <title>Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8748394#M76591</link>
      <description>&lt;P&gt;I am trying to place some text on a drawing through a VBA macro.&amp;nbsp; The text will be going within the bounding box of a base view and I want to check that there is nothing (model geometry or other annotations) in that location that the text will overlap with.&amp;nbsp; I will be looking at a strictly rectangular region.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to simulate a "window select" operation (typically performed by clicking and dragging the left mouse button in the viewport).&amp;nbsp; More specifically I would like to simulate a right-to-left (intersect) "window select" operation.&amp;nbsp; My idea is to use the SelectSet resulting from that operation to determine if any of the object types I'm worried about are present in that region.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot find any documentation or forum posts with a way to do a "window select" with VBA.&amp;nbsp; Is there a way to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, is there another way to check if a rectangular region on a drawing sheet is free of certain types of entities?&amp;nbsp; Preferably I would like a list of all the objects in that region so I can do my own filtering operations.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 19:07:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8748394#M76591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-23T19:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749819#M76592</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that below API sample link may helpful to your situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-60F44C84-D0A6-445B-ADDB-575E3B420DC2" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-60F44C84-D0A6-445B-ADDB-575E3B420DC2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 11:34:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749819#M76592</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-04-24T11:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749867#M76593</link>
      <description>&lt;P&gt;The link appears broken.&amp;nbsp; The page gives me a 404.&amp;nbsp; I've had this issue before with the online API help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can give me the navigation path through the topics, I can find it.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 11:50:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749867#M76593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-24T11:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749880#M76594</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's working for me. You can also refer the same documentation in Inventor product as shown in below image.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="API documentation.png" style="width: 618px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/629405i1B086475B7ACD80C/image-size/large?v=v2&amp;amp;px=999" role="button" title="API documentation.png" alt="API documentation.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 11:54:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749880#M76594</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-04-24T11:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749905#M76595</link>
      <description>&lt;P&gt;Yes, but is there a specific topic you are referring to?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 12:04:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749905#M76595</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-24T12:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749927#M76596</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Search with keyword "Window Selection API Sample".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 12:14:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8749927#M76596</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-04-24T12:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8750601#M76597</link>
      <description>&lt;P&gt;I found the sample and attempted to test it out.&amp;nbsp; I've read through the code and, while I don't understand a good portion of it, I don't think this is the functionality that I'm looking for.&amp;nbsp; This appears to modify and filter the user's window selection actions.&amp;nbsp; I want window selection to be accomplished completely automatically.&amp;nbsp; The code will need some way for me to specify the start and end 2d points for the selection window.&amp;nbsp; This doesn't contain any way to perform such definitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried running the code following the instructions in the commented lines and on the API help page, however it doesn't appear to be working.&amp;nbsp; My understanding from the code is this is to be performed on a part file and will only select circular edges and circular arcs.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 15:39:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8750601#M76597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-24T15:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8754956#M76598</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below VBA code.&lt;/P&gt;
&lt;PRE&gt;' The declarations and functions below need to be copied into
' a class module whose name is "clsSelect". The name can be
' changed but you'll need to change the declaration in the
' calling function "TestWindowSelection" to use the new name.

' Declare the event objects
Private WithEvents oInteractEvents As InteractionEvents
Private WithEvents oSelectEvents As SelectEvents

' Declare a flag that's used to determine if command prompts are shown as tooltips.
Private bTooltipEnabled As Boolean

Public Function WindowSelect()
   ' Create an InteractionEvents object.
   Set oInteractEvents = ThisApplication.CommandManager.CreateInteractionEvents

   ' Ensure interaction is enabled.
   oInteractEvents.InteractionDisabled = False

   ' Set a reference to the select events.
   Set oSelectEvents = oInteractEvents.SelectEvents

   ' Set the filter for circular edges (this includes circular arcs).
   oSelectEvents.AddSelectionFilter kAllEntitiesFilter

   oSelectEvents.WindowSelectEnabled = True

   bTooltipEnabled = ThisApplication.GeneralOptions.ShowCommandPromptTooltips
   ThisApplication.GeneralOptions.ShowCommandPromptTooltips = True

   oInteractEvents.StatusBarText = "Window select. Esc to exit."

   ' Start the InteractionEvents object.
   oInteractEvents.Start
End Function

Private Sub oInteractEvents_OnTerminate()
   ' Reset to original value
   ThisApplication.GeneralOptions.ShowCommandPromptTooltips = bTooltipEnabled

   ' Clean up.
   Set oSelectEvents = Nothing
   Set oInteractEvents = Nothing
End Sub

Private Sub oSelectEvents_OnPreSelect(PreSelectEntity As Object, DoHighlight As Boolean, MorePreSelectEntities As ObjectCollection, ByVal SelectionDevice As SelectionDeviceEnum, ByVal ModelPosition As Point, ByVal ViewPosition As Point2d, ByVal View As View)
   ' Set a reference to the selected edge.
   ' Only circular edges can come through since the circular edge filter was set.
   'Dim oEdge As Edge
   'Set oEdge = PreSelectEntity

   ' Allow only fully circular edges to be picked.
   'f Not oEdge.GeometryType = kCircleCurve Then
    ' DoHighlight = False
   'End If
End Sub

Private Sub oSelectEvents_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, ByVal SelectionDevice As SelectionDeviceEnum, ByVal ModelPosition As Point, ByVal ViewPosition As Point2d, ByVal View As View)
   MsgBox "Picked " &amp;amp; JustSelectedEntities.Count &amp;amp; " objects."
End Sub&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 11:00:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8754956#M76598</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-04-26T11:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8759269#M76599</link>
      <description>&lt;P&gt;Like I said before, this does not do what I want it to do.&amp;nbsp; This just modifies the behavior of the MANUAL window select.&amp;nbsp; I want to perform the window select operation COMPLETELY through the code.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 11:45:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8759269#M76599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-29T11:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8760775#M76600</link>
      <description>&lt;P&gt;@Anonymous Just throwing this out there.&amp;nbsp; You can add any drawing views on the sheet to a selectset and pick up the coords from there.&amp;nbsp; Or simply just get the coords of symbol and coords of each drawing view, bypass the selectset.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 21:17:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8760775#M76600</guid>
      <dc:creator>CadUser46</dc:creator>
      <dc:date>2019-04-29T21:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8767807#M76601</link>
      <description>&lt;P&gt;That's not unlike something I've tried in the absence of any solutions through the forum.&amp;nbsp; Basically I'm collecting all the line segments from the drawing view and creating transient geometry to represent annotations (balloons mostly).&amp;nbsp; I'm doing position and intersection checks on all of those pieces of geometry to determine if anything lies fully or partially inside the box I specify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;This is not a good solution&lt;/U&gt;.&amp;nbsp; It's a couple of hundred lines of code and takes 2-5 MINUTES to check ONE rectangle.&amp;nbsp; I need to perform this dozens of times per view, per sheet, per drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I click and drag (right-to-left) with the mouse in the viewport I can perform a window select operation that selects any objects that intersect the selection box and it takes only milliseconds (i.e. nothing noticeable to the user) to process.&amp;nbsp; The window select operation is performing the exact same "collision" checks between a large number of curves and a simple rectangular region of the screen.&amp;nbsp; There's got to be a way to do a similar rectangular selection operation through code and achieve similar performance.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 18:42:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8767807#M76601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-02T18:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8769153#M76602</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please describe the same procedure with help of video record or screencast?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make sure that files are non confidential.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 11:02:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8769153#M76602</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-05-03T11:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8769695#M76603</link>
      <description>&lt;P&gt;Which procedure are you referring to?&amp;nbsp; The window select operation?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 14:53:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8769695#M76603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-03T14:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8774654#M76604</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That's not unlike something I've tried in the absence of any solutions through the forum.&amp;nbsp; Basically I'm collecting all the line segments from the drawing view and creating transient geometry to represent annotations (balloons mostly).&amp;nbsp; I'm doing position and intersection checks on all of those pieces of geometry to determine if anything lies fully or partially inside the box I specify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;This is not a good solution&lt;/U&gt;.&amp;nbsp; It's a couple of hundred lines of code and takes 2-5 MINUTES to check ONE rectangle.&amp;nbsp; I need to perform this dozens of times per view, per sheet, per drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I click and drag (right-to-left) with the mouse in the viewport I can perform a window select operation that selects any objects that intersect the selection box and it takes only milliseconds (i.e. nothing noticeable to the user) to process.&amp;nbsp; The window select operation is performing the exact same "collision" checks between a large number of curves and a simple rectangular region of the screen.&amp;nbsp; There's got to be a way to do a similar rectangular selection operation through code and achieve similar performance.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whatever the procedure mentioned in the above statement. Please make sure that files are non confidential.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 04:45:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8774654#M76604</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2019-05-07T04:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8775452#M76605</link>
      <description>&lt;P&gt;I have attached a screenshot below of the window select operation.&amp;nbsp; This is not a VBA function.&amp;nbsp; It's literally just a click and drag.&amp;nbsp; All I want to do is simulate this same functionality using code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Inventor Drawing Window Select.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/633896i2C716DC10BBE0D96/image-size/large?v=v2&amp;amp;px=999" role="button" title="Inventor Drawing Window Select.png" alt="Inventor Drawing Window Select.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; The cursor is not visible because the Windows "Print Screen" function hides it.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 12:24:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8775452#M76605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-07T12:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8775647#M76606</link>
      <description>&lt;P&gt;I googled, found this &lt;A href="https://wellsr.com/vba/2015/excel/vba-mouse-move-and-mouse-click-macro/" target="_blank"&gt;https://wellsr.com/vba/2015/excel/vba-mouse-move-and-mouse-click-macro/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modified to this&lt;/P&gt;
&lt;PRE&gt;'Declare mouse events
Public Declare PtrSafe Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Public Declare PtrSafe Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Const MOUSEEVENTF_LEFTDOWN = &amp;amp;H2
Public Const MOUSEEVENTF_LEFTUP = &amp;amp;H4

Sub MoveMouse()

    'You need to set focus on the application
    SetCursorPos 1200, 500
    mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
    SetCursorPos 600, 800
    mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0

End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 May 2019 13:19:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8775647#M76606</guid>
      <dc:creator>CadUser46</dc:creator>
      <dc:date>2019-05-07T13:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8775919#M76607</link>
      <description>&lt;P&gt;Thank you, I will give this a try.&amp;nbsp; I was hoping to avoid moving the mouse directly, but if this is the only option then this is what I'll have to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to convert from screen coordinates to sheet coordinates?&amp;nbsp; I don't know where on the screen my drawing view will be, but I do know where on the sheet it is.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 14:38:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8775919#M76607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-07T14:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8776048#M76608</link>
      <description>&lt;P&gt;Mate, i literally spent a few minutes googling this.&amp;nbsp; I imagine there is some way to read the position of the graphics window (via Inventor api) and/or convert this into a percentage of the screen resolution (Windows api).&amp;nbsp; I'm well outside the 'I've tried this before' range.&amp;nbsp; I simply have never needed to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a pure guess.&lt;/P&gt;
&lt;P&gt;Use the application windows handle MainFrameHWND to set focus or something.&lt;/P&gt;
&lt;P&gt;Zoom extents the sheet so you know where it's expected to be.&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;The api exposes thisapplication.height and .width, you could use these to estimate where you want to select.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;If you use thisapplication.views.item(x).height/width it gives the values of the graphics window.&amp;nbsp; But not their position on the monitor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still have a feeling there must be a better way to achieve what you want but i really don't fully understand your description.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 15:18:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8776048#M76608</guid>
      <dc:creator>CadUser46</dc:creator>
      <dc:date>2019-05-07T15:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8776090#M76609</link>
      <description>&lt;P&gt;Are you sure you cant just read&lt;/P&gt;
&lt;P&gt;thisapplication.activedocument.sheets.drawingviews.position.x/y, and height/width&lt;/P&gt;
&lt;P&gt;then use that along with the same values for each symbol to tell if any of them are overlapping.&amp;nbsp; I'm right in thinking this is just like hit boxes in a game?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Loop the dawing views. Make some kind of array/collection of the x coords that are occupied by views.&amp;nbsp; Then do the same for all the y coords. ie 10-45, 65-80, 95-150.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then loop the symbols.&amp;nbsp; Calculate their four extents.&amp;nbsp; Check if each exists inside the sets X and Y (union of X and Y) then you know it overlaps.&amp;nbsp; Just a thought as it's easier to use what the api exposes, rather than force it to work how you're thinking.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 15:32:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8776090#M76609</guid>
      <dc:creator>CadUser46</dc:creator>
      <dc:date>2019-05-07T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Window Select/Region is Empty on Inventor Drawing with VBA</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8776175#M76610</link>
      <description>&lt;P&gt;I really appreciate your willingness to help me out.&amp;nbsp; I know this is a weird use case and I'm not doing a very good job explaining myself.&amp;nbsp; Here is an example of a drawing view with some annotations that describe what I'm trying to detect.&amp;nbsp; Basically I want to know (through programming) "can I place an annotation here and not have it overlap something?".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Drawing Text Interference.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/633982i12F14DEED5794904/image-size/large?v=v2&amp;amp;px=999" role="button" title="Drawing Text Interference.PNG" alt="Drawing Text Interference.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are correct, it's something like hitboxes in a game.&amp;nbsp; Unfortunately simple rectangular "hitboxes" won't suffice, I need more precise "collision detection".&amp;nbsp; The problem is that most of our pages are very tightly packed (these drawings are for part manuals) and I can't afford to only place annotations outside of the view's bounding box (which would be really easy).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because of that, I can't generalize the shape of drawing views as rectangles because some of our geometry leaves plenty of white space inside the view bounding box that is available for annotations.&amp;nbsp; Here is a hand-drawn example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20190507_115238.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/633986i65AF7AC4743E057D/image-size/large?v=v2&amp;amp;px=999" role="button" title="20190507_115238.jpg" alt="20190507_115238.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; The black rectangles don't represent any actual object on a sheet, just an area that I'm interested in placing an annotation.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 16:05:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/window-select-region-is-empty-on-inventor-drawing-with-vba/m-p/8776175#M76610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-07T16:05:48Z</dc:date>
    </item>
  </channel>
</rss>

