<?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 Inventor Vb.Net &amp;quot;AddIn&amp;quot; - Show iProperties Dialog Box &amp;amp; Tab Across To &amp;quot;Project&amp;quot; in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-vb-net-quot-addin-quot-show-iproperties-dialog-box-amp/m-p/13126894#M4652</link>
    <description>&lt;P&gt;Can anybody help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a Vb.Net "AddIn" that automatically creates a button that calls a sub-routine..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At present, when I press this button, the "AddIn" displays a simple message box to test if the button works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The button calls a sub routine and works as expected.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change the sub-routine, for testing purposes, so that it shows the iProperties dialog box and then tabs across to the Project tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the code I currently have but it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Imports Inventor&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Module Module10&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Sub DisplayProperties()&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ThisApplication = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ThisApplication.CommandManager.ControlDefinitions.Item("AppiPropertiesWrapperCmd").Execute2(False)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;TabCount = "2" ' Properties Tab&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;My.Computer.Keyboard.SendKeys("{RIGHT " + TabCount + "}", True)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ThisApplication.UserInterfaceManager.DoEvents()&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;End Module&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does anybody know what is wrong and rectify the error for me?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;</description>
    <pubDate>Sun, 03 Nov 2024 09:35:15 GMT</pubDate>
    <dc:creator>isocam</dc:creator>
    <dc:date>2024-11-03T09:35:15Z</dc:date>
    <item>
      <title>Inventor Vb.Net "AddIn" - Show iProperties Dialog Box &amp; Tab Across To "Project"</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-vb-net-quot-addin-quot-show-iproperties-dialog-box-amp/m-p/13126894#M4652</link>
      <description>&lt;P&gt;Can anybody help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a Vb.Net "AddIn" that automatically creates a button that calls a sub-routine..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At present, when I press this button, the "AddIn" displays a simple message box to test if the button works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The button calls a sub routine and works as expected.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change the sub-routine, for testing purposes, so that it shows the iProperties dialog box and then tabs across to the Project tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the code I currently have but it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Imports Inventor&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Module Module10&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Sub DisplayProperties()&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ThisApplication = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ThisApplication.CommandManager.ControlDefinitions.Item("AppiPropertiesWrapperCmd").Execute2(False)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;TabCount = "2" ' Properties Tab&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;My.Computer.Keyboard.SendKeys("{RIGHT " + TabCount + "}", True)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ThisApplication.UserInterfaceManager.DoEvents()&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;End Module&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does anybody know what is wrong and rectify the error for me?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;</description>
      <pubDate>Sun, 03 Nov 2024 09:35:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-vb-net-quot-addin-quot-show-iproperties-dialog-box-amp/m-p/13126894#M4652</guid>
      <dc:creator>isocam</dc:creator>
      <dc:date>2024-11-03T09:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor Vb.Net "AddIn" - Show iProperties Dialog Box &amp; Tab Across To "Project"</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-vb-net-quot-addin-quot-show-iproperties-dialog-box-amp/m-p/13129217#M4653</link>
      <description>&lt;P&gt;I usually use this line instead, within an iLogic rule:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;System.Windows.Forms.SendKeys.SendWait("{RIGHT 2}")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think someone from Autodesk mentioned that we must use the SendWait method from our rules.&amp;nbsp; Not sure if it is different for add-ins.&lt;/P&gt;
&lt;P&gt;However, you may need to ensure that those keystrokes get sent to the correct place, by making sure the Inventor application currently has 'system focus', otherwise who knows where they may get sent, or what the result may be.&amp;nbsp; The simplest way I used in the past was the AppActivate(ThisApplication.Caption) method.&amp;nbsp; But there are more advanced, and perhaps more accurate ways of doing this also. such as the SetForegroundWindow function from the user32.dll reference, which requests the HWND (IntPtr) of the window, which can be obtained from &lt;A href="https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=Application_MainFrameHWND" target="_blank" rel="noopener"&gt;Application.MainFrameHWND&lt;/A&gt;&amp;nbsp;property.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 17:15:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-vb-net-quot-addin-quot-show-iproperties-dialog-box-amp/m-p/13129217#M4653</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-11-04T17:15:10Z</dc:date>
    </item>
  </channel>
</rss>

