<?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: Emulate shortcut press (iLogic) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894588#M55638</link>
    <description>&lt;P&gt;I confirm your solution works for Help-Call-shortcut but for some reason it doesn't work for Clear-Screen-shortcut ("Ctrl+0") which i try to call in this way:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AppActivate(ThisApplication.Caption)
System.Windows.Forms.SendKeys.SendWait("^0")&lt;/LI-CODE&gt;&lt;P&gt;Don't you have any guess why?&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 12:34:43 GMT</pubDate>
    <dc:creator>Maxim-CADman77</dc:creator>
    <dc:date>2020-11-25T12:34:43Z</dc:date>
    <item>
      <title>Emulate shortcut press (iLogic)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9892400#M55636</link>
      <description>&lt;P&gt;I'd like to know how can I programmatically emulate pressing keyboard shortcut.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm aware that emulating key press is a lame practice but I don't see any alternative way to force Inventor behave in the way I prefer.&lt;/P&gt;&lt;P&gt;I want to have Projection type "Perspective with ortho faces" be active "by default" in 3D-modelling environments but corresponding idea published in 2013 seems to have no chances to be implemented (under-voted).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see there is a possibility to set up keyboard shortcut with the mode I'm interested in (and manuall pressingdoes the trick). The problem - its effect is limited to the active 3Dmodel only. I need to remember pressing the shortcut for each newely opened 3Dmodel which is quite tedious.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also see threads that desribes key-press emulating within Inventor's child windows but I fail to emulate key-press without those windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let say I want to emulate pressing Help-button with iLogic,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe it should look like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;System.Windows.Forms.SendKeys.SendWait("{F1}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it does nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 16:15:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9892400#M55636</guid>
      <dc:creator>Maxim-CADman77</dc:creator>
      <dc:date>2020-11-24T16:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Emulate shortcut press (iLogic)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894553#M55637</link>
      <description>&lt;P&gt;I think maybe this is what you are looking for.&amp;nbsp; This is what makes it work for me.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AppActivate(ThisApplication.Caption)
System.Windows.Forms.SendKeys.SendWait("{F1}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you have time, please... Vote For &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank"&gt;My IDEAS &lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&lt;/SPAN&gt;&lt;/A&gt;and Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/" target="_blank"&gt;Inventor 2021 Help &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78/" target="_blank"&gt;Inventor Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-customization/bd-p/120/" target="_blank"&gt;Inventor Customization Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/" target="_blank"&gt;Inventor Ideas Forum &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 12:18:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894553#M55637</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-11-25T12:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Emulate shortcut press (iLogic)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894588#M55638</link>
      <description>&lt;P&gt;I confirm your solution works for Help-Call-shortcut but for some reason it doesn't work for Clear-Screen-shortcut ("Ctrl+0") which i try to call in this way:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;AppActivate(ThisApplication.Caption)
System.Windows.Forms.SendKeys.SendWait("^0")&lt;/LI-CODE&gt;&lt;P&gt;Don't you have any guess why?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 12:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894588#M55638</guid>
      <dc:creator>Maxim-CADman77</dc:creator>
      <dc:date>2020-11-25T12:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Emulate shortcut press (iLogic)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894752#M55639</link>
      <description>&lt;P&gt;I'm not sure why some things work with SendKeys while other do not, but perhaps you can achieve your goal of setting the "Perspective with Ortho Faces" setting in another, more stable way.&amp;nbsp; For instance, by executing its command.&lt;/P&gt;&lt;P&gt;Here are a few commands you can play around with:&lt;/P&gt;&lt;P&gt;To enable the view cube use this one:&amp;nbsp; "AppViewCubeCmd"&lt;/P&gt;&lt;P&gt;Then you can use one of these&lt;/P&gt;&lt;P&gt;"AppViewCubePerspectiveOrthoCmd"&lt;/P&gt;&lt;P&gt;"AppPerspectiveOrthoCameraCmd"&lt;/P&gt;&lt;P&gt;'or to switch back&lt;/P&gt;&lt;P&gt;"AppViewCubeHomeCmd"&lt;/P&gt;&lt;P&gt;"AppViewCubeOrthographicCmd"&lt;/P&gt;&lt;P&gt;"AppViewCubePerspectiveCmd"&lt;/P&gt;&lt;P&gt;"AppOrthographicCameraCmd"&lt;/P&gt;&lt;P&gt;"AppPerspectiveCameraCmd"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 13:47:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9894752#M55639</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-11-25T13:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Emulate shortcut press (iLogic)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9899154#M55640</link>
      <description>&lt;P&gt;My first guessing regarding instability of SendKeys command was that it works only for OS shortcuts and so-called Reserved*&amp;nbsp;Inventor shortcuts.&lt;/P&gt;&lt;P&gt;But testing revealed that even out of the Reserved shortcuts very few can be really emulated with the command. Thus it seems you are right and it is impossible to produce the desired workaround using SendKeys command as a core ...and I have no any further ideas for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* I've counted 13 non-customizable Inventor shortcuts :&lt;/P&gt;&lt;P&gt;Alt+F1&lt;/P&gt;&lt;P&gt;Alt+F8&lt;/P&gt;&lt;P&gt;Alt+F11&lt;/P&gt;&lt;P&gt;Ctrl+C&lt;/P&gt;&lt;P&gt;Ctrl+Enter&lt;/P&gt;&lt;P&gt;Ctrl+V&lt;/P&gt;&lt;P&gt;Ctrl+X&lt;/P&gt;&lt;P&gt;F5&lt;/P&gt;&lt;P&gt;F6&lt;/P&gt;&lt;P&gt;F7&lt;/P&gt;&lt;P&gt;F10&lt;/P&gt;&lt;P&gt;Shift+F3&lt;/P&gt;&lt;P&gt;Shift+F5&lt;/P&gt;&lt;P&gt;...which of course is not a complete list of shortcuts that user can't set as a custom command (other are: F1, Tab, Space, BackSpace, CapsLock, Shift+Ins ... etc...)&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 11:18:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/emulate-shortcut-press-ilogic/m-p/9899154#M55640</guid>
      <dc:creator>Maxim-CADman77</dc:creator>
      <dc:date>2020-11-27T11:18:27Z</dc:date>
    </item>
  </channel>
</rss>

