05-01-2020 02:22 PM
Not sure if there's a way to copy data from Excel and paste into LabVIEW controls and constants but I haven't had much luck. Also there's seems to be an Export to excel, but no "Import from Excel" shortcut menu. Normal programmers will write code to import the table and column headers at runtime, but sometimes you just need to paste data into 2D array string constants for prototyping etc.
So being extremely bored in quarantine I made a simple quick drop plugin that lets you copy data from Excel or Notepad (in CSV,TSV,SpaceSV,;SV format) and paste it into various controls. Hopefully I'm not duplicating an existing capability but if so, oh well it was a fun exercise.
Default shortcut key is Q because I couldn't think of any other letter. Shift Q removes the first row (header) and places it in the "Col Headers" of appropriate controls.
This should probably be a Shortcut Menu Plugin, but I can never find that group because I always think of the Right Click Framework (RCF), search on it and fail. The next step will be to adapt to a shortcut menu.
This is my first attempt at publishing a quick drop plugin (and using github) so pardon any faux paus I make.
05-01-2020 02:56 PM
This is a cool plugin, thanks for sharing.
This should probably be a Shortcut Menu Plugin, but I can never find that group because I always think of the Right Click Framework (RCF), search on it and fail.
There is a vanity URL: http://www.ni.com/lvmenus
Hopefully that's easier to remember?
05-03-2020 01:39 AM
This should probably be a Shortcut Menu Plugin...
I have the attached (LV 2015) shortcut I use occasionally, which allows me to copy from Excel, paste into LV and then right click the constant/string and convert it to an array. Not ideal, but it does the job. I think I wrote it, but I don't remember doing it (it's extremely basic and quick and dirty, so it wouldn't surprise me that I don't remember).
It seems like a port of your plugin will be more elegant, but this has been useful.
05-03-2020 11:05 AM
Thanks I'll take a look.
05-04-2020 04:26 PM
Ok I created a companion shortcut plugin menu for this quick drop and added it here.
Also during development of that, I found a few issues with the parsing and updated this quick drop.
The quick drop and shortcut menu share subvis. For now I have separate copies of each subVI in both libraries. I'm sure thats not the best way of doing things. Any suggestions on how to handle this? Is there some common folder (other than vi.lib or user.lib) that subVIs for both quick drops and shortcut plugins should go or is it OK to have duplicate VIs (and names) in each subdir?
Latest versions are always on github but attached here for your convenience.
05-06-2020 08:43 AM
There's been a request to support Maps/Sets in the Shortcut Menu Plugin forum. Would you guys like to see that in the quick drop plug in as well?