<?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 How to programmatically set shortcut menu without Event Structure in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2477434#M757706</link>
    <description>&lt;P&gt;Hey guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this application where I would have to change the shortcut menu of multiple controls dynamically.&lt;/P&gt;
&lt;P&gt;Specifically, I am thinking about loading the shortcut menu info from a file, and altering the shortcut menu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;of several controls of a VI at the start.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-I know you can use event structure to get the MenuRef of a certain control, but is it possible to get this&lt;/P&gt;
&lt;P&gt;without using an event structure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Since I have a lot of controls to change, even if I have to use an event structure, is there an efficient way of &lt;/P&gt;
&lt;P&gt;changing shorcut menu like you can with property node? (eg: get reference with Controls[] and using For Loop to set all necessary properties)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2013 16:50:12 GMT</pubDate>
    <dc:creator>doradorachan</dc:creator>
    <dc:date>2013-07-01T16:50:12Z</dc:date>
    <item>
      <title>How to programmatically set shortcut menu without Event Structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2477434#M757706</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this application where I would have to change the shortcut menu of multiple controls dynamically.&lt;/P&gt;
&lt;P&gt;Specifically, I am thinking about loading the shortcut menu info from a file, and altering the shortcut menu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;of several controls of a VI at the start.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-I know you can use event structure to get the MenuRef of a certain control, but is it possible to get this&lt;/P&gt;
&lt;P&gt;without using an event structure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Since I have a lot of controls to change, even if I have to use an event structure, is there an efficient way of &lt;/P&gt;
&lt;P&gt;changing shorcut menu like you can with property node? (eg: get reference with Controls[] and using For Loop to set all necessary properties)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 16:50:12 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2477434#M757706</guid>
      <dc:creator>doradorachan</dc:creator>
      <dc:date>2013-07-01T16:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically set shortcut menu without Event Structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2477440#M757708</link>
      <description>&lt;P&gt;Just as a clarification, I am talking about the runtime shortcut menu, like when you right click a control,&lt;/P&gt;
&lt;P&gt;it would display: Properties, Reset to Default Values,etc..&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 16:53:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2477440#M757708</guid>
      <dc:creator>doradorachan</dc:creator>
      <dc:date>2013-07-01T16:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to programmatically set shortcut menu without Event Structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2479976#M758160</link>
      <description>&lt;P&gt;Here's a way to do it, but it's a bit kludgey:&lt;/P&gt;
&lt;P&gt;Do this for each control that will have changing menus.&lt;/P&gt;
&lt;P&gt;1. Right-click the control, select Advanced -&amp;gt; Runtime Shortcut Menu -&amp;gt; Edit ...&lt;/P&gt;
&lt;P&gt;2. Create a set of .rtm files with the different custom menus (give them crazy names like "Ctl_A Menu_1.rtm", "Ctl_A Menu_2.rtm").&lt;/P&gt;
&lt;P&gt;3. Using the same process, create one more .rtm file with anything for the menu (Name it something like "Ctl_A Menu.rtm").&amp;nbsp; When you exit the menu editor, be sure to answer "Yes" when it asks if you want to change the run-time menu.&amp;nbsp; Now the runtime menu for that control will be linked to that file.&lt;/P&gt;
&lt;P&gt;4. To programatically change the runtime menu for that control, before the VI is loaded, copy one of the custom menus (e.g. "Ctl_A Menu_1.rtm") over the linked menu file ("Ctl_A Menu.rtm"), then load and run the VI&lt;/P&gt;
&lt;P&gt;Here's what that code could look like:&lt;/P&gt;
&lt;P&gt;.&lt;IMG src="https://ip1.i.lithium.com/3fcad7718960afd7a6a1a976177301f6b1e5d371/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31313336353869453230333133343838423535333644432f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Captured001.png" title="Captured001.png" align="center" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 13:32:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-programmatically-set-shortcut-menu-without-Event/m-p/2479976#M758160</guid>
      <dc:creator>paul_cardinale</dc:creator>
      <dc:date>2013-07-03T13:32:47Z</dc:date>
    </item>
  </channel>
</rss>

