Jump to content

Command Line Interface


Recommended Posts

Having been using LV for some time now, I start to get annoyed more and more by the incredible amount of mouse movements/clicks I have to make. For every component you need to move your mouse to the functions/controls box (or right-click), go through several submenus, find your desired function and place it on the diagram. I find that this is not only very (and needlessly) mouse-intensive, but also removes my focus from the code I'm producing, and thereby breaks my concentration and decreases the amount of code I could produce per hour.

It would be much easier if this could be done with the keyboard, or some kind of command line interface. Just like in autoCAD, where you can produce a line either by clicking the `line'-button or by pressing the `l'-key and the spacebar. Adapting this for labview would mean that (just an example) typing `BO' - space would give me a boolean constant on my mouse cursor. One hand on the keyboard types the codes needed, the other hand on the mouse places and connects the stuff conjured up by the codes... I could keep my attention on the code itself (increasing concentration and efficiency) and greatly reduce the amount of mouse movement I need to make.

I know, this would come at the cost of learning a 2 or 3 character code per function/control you'd like to place, but from my autoCAD experience I can tell you this is well worth the effort. Or, if people don't like to learn these codes, they can still use the mouse to find the appropriate icon for it (among autoCAD users there's also a group of people only using the buttons and never using the command line). It's a matter of taste - I'm more a keyboard kinda guy.

Of course a shortcut-key needs to be provided to switch off the command line in order to put regular text on the diagram or in string constants and such.

I'd say it's not a lot of work to include this in the next version of LV. Command Line Interfacers! Who's with me? Raise your fist!

Klomp

P.S. Submitted this idea on the NI wish list a few months ago. No response yet...

Link to comment

I already wrote almost exactly what you are talking about. LINK

From that time I don't develop it further because.... I don't use it. Maybe it is a question of inertia. Maybe I just don't remember to turn it on or do not have time to define macros. I use 8.2 so I haven't Quick Drop.

But I just noticed that there is 300+ downloads. People, do you use it?

Link to comment

vugie and ned beat me to it, but I was gonna say that this sounds just like the quick drop that was introduced in LV8.6. I haven't used the tool much yet, mostly from habbit of all the clicking around with the menu. I'll have to experiment more.

Link to comment

O O It seems like I should Read The F***ing Manual. I've looked at quick drop before but never saw the `super quick drop' option or the shortcuts - and without those it's quite useless so I dismissed it without looking further. My bad, should've had faith in NI.

Although quick drop is not exactly what I'm looking for (I'd like it to be always-on) it sure seems like a step in the right direction.

Imma try the Darren way as well as Vugie's VI (I guess I'll have to adapt it to obtain the exact functionality I want).

Thanks guys!

Link to comment

I use QuickDrop alot it's a great tool. Now depending of how you work and what kind of code you're writing I came to think of a feature close to QuickDrop, I would call it QuickPalette, it is the possibility to pin-up a sub-palette like you choose a function wit QuickDrop.

For instance, I'm writing a VI for managing INI settings, so I hit QuickPalette key shortcut and then hit "Configuration Files" (or the token it set for this) and then it pins up the Config Files sub-palette.

I often have 2 or 3 subpalettes pined up when coding.. So QuickPalette would be really cool! no ?

Link to comment

Actually wouldn't it be so much better if you just told LV what you wanted to do and that way you wouldn't need to move your hands from the mouse, or dig down through copious levels of menus?

Well if you're not sure... take my word for it, it is!

A side project of mine

LVSpeak and QuickEdit

http://forums.lavag.org/LVSpeak-tell-LV-wh...-do-t13687.html

You can now simply tell LV "Align Right" or "VI Properties" or even "Get Pizza" (the last one is functional and an inside joke but does work)

So although every functionality is not present, if you want something added, figure out how to automate it, and add it in!

Link to comment

QUOTE (Antoine Châlons @ Apr 2 2009, 03:51 PM)

Any idea if there is a way to pin up a sub palette programmatically ?

ooooh, I'm thinking no on that one. Palette windows and their functionality are probably not that exposed/extensible.

There is probably a ton of C code behind them and little G hooks.

Maybe if we get Darren on this thread he'll qualify that statement. But for now I'll bet an NI week Beer that it's no.

Link to comment

QUOTE (Norm Kirchner @ Apr 2 2009, 05:20 PM)

I don't know if this wins me the beer or not, but I can get you darn close. Assuming you have all that crazy "scripting" stuff turned on, check out the App method "Hilight Palette Menu Item":

http://lavag.org/old_files/monthly_04_2009/post-4441-1238728342.png' target="_blank">post-4441-1238728342.png?width=400

Pass it the name of an object on the palette you want to bring up, and that palette will appear in the position you specify, with the object whose name you specified highlighted. So it works based off palette object names, not palette names, but it's the closest I can do.

-D

Link to comment

QUOTE (Darren @ Apr 3 2009, 05:13 AM)

So it works based off palette object names, not palette names, but it's the closest I can do.

Does this means I have to make a look up table with :

input = sub palette shortcut I want (e.g cfg for "configuration file functions" palette)

output = the name of an object in that palette

pretty darn close... thanks for that Darren! :)

Link to comment

QUOTE (Klompmans @ Mar 31 2009, 10:02 AM)

I'd say it's not a lot of work to include this in the next version of LV. Command Line Interfacers! Who's with me? Raise your fist!

Klomp

P.S. Submitted this idea on the NI wish list a few months ago. No response yet...

Well I have to say that in the old days I was wishing this too a lot. Before starting with LabVIEW a long time ago, I had worked with a graphical aditor called ged. This was a Unix graphical editor usable for all kinds of things but in our case we were drawing schematic designs with it. It had a pretty fixed UI: a big drawing area, a button bar on the right border with clickable commands (configurable with a configuration file as to what exact command they should do), and a command line on the lower edge where you could also type in all the commands from the button bar as well as many more. The design was stored on disk as a ASCI file and could then be used as input to various other tools such as a PCB editor or an ASIC development toolchain.

I was rarely using the buttons on the button bar but almost constantly typing the abbreviated commands. Sure it required some time to get used to the commands but once you knew them there was no way someone using the mouse could even get close in speed :laugh: .

When starting to work with LabVIEW I loved almost everything about it except the lack of such a command line interface. However that was in the days of LabVIEW 3 and there was no way one could get access to the LabVIEW interna like it is possible now with the scripting interface. There was supposedly a much opener C interface to the LabVIEW kernel (anyone remember tools like SurfaceVIEW or the predecessor to the Vision Toolkit developed by Graftek, or the first version of the Picture Control, who all made use of methods in that C interface not exposed in such a way anymore since a long time) but to be able to use that, one had to basically be intimate with a lot of the LabVIEW interna in a way that was impossible for someone not having worked in the LabVIEW development team.

I think QuickDrop is a good addition but in my case it is about 10 years to late :blink: . I'm not sure I still feel like memorizing keyboard shortcuts for various operations that have gotten so ingrained in my cerebral system that I only have to think about them when something about them has changed between LabVIEW versions :laugh: . That is also why I hate it so much (loat it actually) that the function palettes get reshuffled with almost every new version.

Rolf Kalbermatter

Link to comment

QUOTE (Darren @ Apr 3 2009, 06:13 AM)

My version of QD already does this (with Shift+Enter), both in the original version I posted to LAVA and in the limited release one based on the QD code. Norm, if you want to save some time, you can probably use it the way I did in the private version (as I remember, it did require some effort, so you would probably want to leverage that).

Link to comment

My first thought on reading the subject line was, "There's nothing sadder than an injured mouse." :)

But on a more practical note... Here in the US Fed Gov't there's a big push for only purchasing technology items if they are accessable to people with disabilities. We often have to submit lengthy justifications for an item if it's not compliant with Section 508. LabVIEW does not comply, mostly due to the "keyboard=good, mouse=bad" part of Section 508. You can read all about it at:

http://www.ni.com/pdf/gsa/en/labview-508-a...ance-matrix.pdf

Until 10 minutes ago I didn't even know about Quick Drop. Tools like this can definitely help answer some of the Section 508 issues (and reduce my justification paperwork!)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.