Tags |
(This content has not been tagged yet)
|
![]() |
Sep 1 2007, 08:25 PM
Post
#1
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1621 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
Staying until the end of NIWeek has its advantages: At the end of the very last session in the last day, frequent LAVA poster Darren showed a demo of a potential time saving tool he was thinking about for a future LabVIEW version.
The tool allows you to use a simple key combo which will cause a small pop up to appear. You type the name (or keyword) of the function you want it use, it uses autocomplete and when you click enter you can immediately drop it in your code. This will allow you to drop any VI from the palettes in your code in a few key clicks without having to dig it out from the palette. The problem is that I was impatient, so I wanted this now. So, while waiting for my flight the next day, I coded up a quick example (7.0) to see how it would work, and it is a very simple example - type the name of a function\VI in the string and press Enter. It will allow you to drop that function\control in the BD\FP of any VI. There are some issues with it, however, and I want opinions.
The most up to date version (DropIt.zip) is also attached to this post.
Attached File(s)
Drop_function_by_name.vi ( 83.35K )
Number of downloads: 214
DropIt.zip ( 632.94K )
Number of downloads: 31-------------------- More than meets the eye...
|
||
|
|
|||
| Ad |
Sep 1 2007, 08:25 PM
Post
#
|
||
|
|
|
||
|
|
|||
Sep 1 2007, 09:05 PM
Post
#2
|
|||
![]() CCT It Premium Member ![]() Posts: 1331 Joined: 13-June 05 From: Woerden, Netherlands Member No.: 2399 Using LabVIEW Since:2001 LV:8.5.1 ,6.1 ,8.2.1
My Blog
My Gallery
|
The tool allows you to use a simple key combo which will cause a small pop up to appear. You type the name (or keyword) of the function you want it use, it uses autocomplete and when you click enter you can immediately drop it in your code. This will allow you to drop any VI from the palettes in your code in a few key clicks without having to dig it out from the palette. .... 3. Another problem is monitoring this. This can't be done using LabVIEW events. I was thinking of using polling and trying to load the tool at LabVIEW startup and having it run in the background all the time. I believe this is relatively simple using some callbacks which LabVIEW has, but I need to check if they work with 8.x. This could obviously interfere with what users do, but I think it's the only viable way. ... 6. At the moment, this is relatively similar to the search window. What would be its advantages over it?What do people think about all this? Are there alternative suggestions? Yen you limit yourself way too much What about the current discussions on using custom shortcuts for tools options. What about a 'Update SCC'/Check out/Run VI analyzer A lot of things come to mind. A probable event driven approach to 'key down' is added. I've looked at your code but haven't studied it... (sorry) Ton
Attached File(s)
--------------------
|
||
|
|
|||
Sep 2 2007, 02:50 AM
Post
#3
|
|||
![]() Extremely Active Premium Member ![]() Posts: 525 Joined: 18-October 05 From: Seattle, WA Member No.: 3266 Using LabVIEW Since:2005 LV:8.5 ,8.2.1 ,7.1.1
My Blog
|
It would seem that you could avoid a lot of initial drawbacks to this idea if you made it a VI you place on the pallete window vs. a shortcut key activated thingy. Sure, a key to bring this (and many other VI's I could think of) would be nice, but I have a feeling that in future releases of LabVIEW they will allow custom VI's to be associated with shortcut keys (NI correct me if I'm wrong...but why else would there be that hint of a "bug" in the File menu shortcuts...?).
I would suggest that getting the autocomplete while typing feature and the "refreshing" of the VI lists would make this tool very beneficial by itself. Then perhaps we can get some kind of workaround so all of our nifty tools can be popped up with a keystroke. Just my 2 cents Great idea by the way!!! --------------------
|
||
|
|
|||
Sep 2 2007, 04:43 PM
Post
#4
|
|||
![]() Extremely Active JKI ![]() Posts: 612 Joined: 19-June 03 From: Bay Area, CA (USA) Member No.: 121 Using LabVIEW Since:1998 LV:8.5.1 ,8.6 ,8.2.1
My Blog
|
...A probable event driven approach to 'key down' is added... Ton You can not register event on VI which are not running (this is a pitty really). Therefore the portable event driven approach VI you attached will not help in this situation. PJM --------------------
|
||
|
|
|||
Sep 2 2007, 06:16 PM
Post
#5
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1621 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
You should note that the key is here is not opening the VI. That's relatively simple. The key is getting the list of all the VIs and primitives (and controls?) in the palettes. At the moment, I used the list from the New VI Object primitive in LabVIEW 7.0, but that is not a solution.
To demonstrate this tool more efficiently, here is a better version. As you can see, the polling is not that bad. Instructions:
As said, there are many improvements which could be made, but I don't want to do anything before I know I can enumerate the palettes. Can anyone with LabVIEW 8.0 try to backsave the palette API linked to in the first post?
Attached File(s)
-------------------- More than meets the eye...
|
||
|
|
|||
Sep 3 2007, 06:57 PM
Post
#6
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1621 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
Two new (related?) important points I thought about -
-------------------- More than meets the eye...
|
||
|
|
|||
Sep 3 2007, 09:10 PM
Post
#7
|
|||
![]() Extremely Active Premium Member ![]() Posts: 525 Joined: 18-October 05 From: Seattle, WA Member No.: 3266 Using LabVIEW Since:2005 LV:8.5 ,8.2.1 ,7.1.1
My Blog
|
Another way is to open and close the VI each time, but since we can't create a permanent menu shortcut, I don't see how to do that other than attempting to include the VI in the top level of the palettes, which would require a few mouse clicks. I personally wouldn't mind having it somewhere near the "Select a VI..." icon in the pallettes as opposed to making it a daemon. My mind would be in that zone anyway when I went to search for a VI ("I need a VI... click, okay, Find a VI..."). Just how my mind works. YMMV --------------------
|
||
|
|
|||
Sep 4 2007, 02:19 AM
Post
#8
|
|||
|
Very Active NI ![]() Posts: 213 Joined: 14-March 06 From: Austin, TX Member No.: 4441 Using LabVIEW Since:1999 LV:8.6 ,8.5 ,8.0
|
Does anyone have other suggestions or ways to make these usable? For my prototype at NI Week, I didn't need to do any polling. I'll give you a hint...I found a VI-based utility that you can launch from a keystroke in LabVIEW, and I hijacked it by putting my Quick Drop VI in place of the existing utility. -D
|
||
|
|
|||
Sep 4 2007, 04:45 PM
Post
#9
|
|||
|
Extremely Active Premium Member ![]() Posts: 430 Joined: 2-February 05 From: Southern California Member No.: 1519 Using LabVIEW Since:2004 LV:8.20 ,7.1.1 ,8.0.1
|
For my prototype at NI Week, I didn't need to do any polling. I'll give you a hint...I found a VI-based utility that you can launch from a keystroke in LabVIEW, and I hijacked it by putting my Quick Drop VI in place of the existing utility. -D Ooohh, hijacking existing tools to use their hotkeys.
|
||
|
|
|||
Sep 4 2007, 06:00 PM
Post
#10
|
|||
![]() Confucius say: Crowded elevator always smell different to midget Admin ![]() Posts: 2363 Joined: 13-October 02 From: Planet Earth Member No.: 2 Using LabVIEW Since:1994 LV:8.5 ,8.2.1 ,7.1.1
My Blog
My Gallery
|
All of this is nice and fun but any solution proposed is still something that is a hack onto the LabVIEW IDE. It also will be a tool made by someone or some entity that thinks they know what I want. What I would really like to see is an API for the rest of us. Something that allows anyone to create extensions to the environment. Event driven, shortcut driven, context sensitive etc. Ya, I know, it takes time and costs money and NI has their priority list... I'm just saying.
Typing something into a textbox to get a function? Those icons on my pallete have names? Who would have thought. Now I just have to figure out what everything is called and I'm set. --------------------
|
||
|
|
|||
Sep 4 2007, 06:24 PM
Post
#11
|
|||
|
Extremely Active Premium Member ![]() Posts: 688 Joined: 3-November 04 From: Boston, MA Member No.: 949 Using LabVIEW Since:1999 LV:7.0 ,8.20 ,8.0
My Gallery
|
What is it called?
Modulo? No. Quotient and Remainder. Xor? No. Not Exclusive Or. I'll stick with the icons... As long as we agree to leave the friggin' palettes alone! --------------------
|
||
|
|
|||
Sep 4 2007, 07:38 PM
Post
#12
|
|||
![]() Confucius say: Crowded elevator always smell different to midget Admin ![]() Posts: 2363 Joined: 13-October 02 From: Planet Earth Member No.: 2 Using LabVIEW Since:1994 LV:8.5 ,8.2.1 ,7.1.1
My Blog
My Gallery
|
I'll stick with the icons... As long as we agree to leave the friggin' palettes alone! First rule of all LabVIEW releases. Palettes will change. --------------------
|
||
|
|
|||