FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a shortcut for "Create Constant"

I find myself doing this 80% of the time...... right-click Create Constant, right-click Create Constant....

I've even renamed this operation the "Easy Button" because it makes so many tasks "easy".

Please tell me there is a keyboard shortcut.... !!!

Get a life? This IS my life!
0 Kudos
Message 1 of 7
(12,250 Views)

As far as I know, there's no keyboard shortcut for the shortcut menu "Create Constant."

If you're typically wiring constants to subVIs (rather than primitive functions), you might try using the feature where you hold down the SHIFT key while dropping a subVI from its connector pane. You get constants for all the non-default inputs.

Here's a quick little screen capture movie to show what I mean: http://screencast.com/t/5bP6R82im

Here's the description from the LabVIEW Help:

Drag a VI icon from the upper-right corner of a front panel or block diagram window to a block diagram to place that VI as a subVI. Press the <Shift> key while dragging to automatically wire the non-default values of the controls as constants for the subVI. If the subVI already appears on the block diagram, press the <Shift> key while dragging onto the existing subVI to update the wired constants. If a control has its default value, LabVIEW discards the constant wired to the subVI. Any inputs not wired to constants are unaffected.


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 2 of 7
(7,193 Views)

Make rigth-click on the node, then press "c" > enter > enter. This creates a constant in some cases.

0 Kudos
Message 3 of 7
(6,457 Views)

Hey Philbot,

 

There isn't one for a specific constant but "Quick Drop" does have something that can make a constant on all the terminals.

 

"Select a VI, then press <ctrl + space> to open Quick Drop. Once the window appears press <ctrl + D> to automatically place and wire all controls and indicators for the selected VI."

 

Boost Productivity with Quick Drop - http://www.ni.com/tutorial/7423/en/

 

If you need more precision or a specific constant you can also make custom "Quick Drop" shortcuts as well.

JY
Application Engineer, RF and Communications
National Instruments
0 Kudos
Message 4 of 7
(6,452 Views)

Hi Philbot,

 

I'm very new to LabVIEW, but I had the same concern. I use a gaming mouse for work to increase my productivity, and those have additional buttons, which can be mapped to macros. For example, I have mapped one of these additional buttons to a macro that executes a right-click, type a C character, and press ENTER with a 2 ms between those commands. With my settings of LabVIEW it seems to do the job. The macro scripting can easily be done through the mouse software from the manufacturer. I don't want to make advertisement here, but I used the Swarm software from ROCCAT for this job.

 

Let me know if this helps,

 

David

0 Kudos
Message 5 of 7
(4,837 Views)

@David.Nguyen wrote:

Hi Philbot,

 

I'm very new to LabVIEW, but I had the same concern. I use a gaming mouse for work to increase my productivity, and those have additional buttons, which can be mapped to macros. For example, I have mapped one of these additional buttons to a macro that executes a right-click, type a C character, and press ENTER with a 2 ms between those commands. With my settings of LabVIEW it seems to do the job. The macro scripting can easily be done through the mouse software from the manufacturer. I don't want to make advertisement here, but I used the Swarm software from ROCCAT for this job.

 

Let me know if this helps,

 

David


That's nifty. Here's the code to do it with Autohotkey for those of us that don't have a mouse with the extra buttons (using say, control + right click):

https://www.ahkgen.com/?indexes=0&comment0=control+right+click+%3D+create+constant&func0=KEY&skeyVal...

0 Kudos
Message 6 of 7
(4,833 Views)

Hi mjshafer93,

 

I didn't know Autohotkey, this looks like a game changer for me. Thanks a lot for sharing this.

 

Take care,

 

David

0 Kudos
Message 7 of 7
(4,827 Views)