07-09-2015 08:19 AM
Thanks, that worked for me. Like other people said, user.lib is probably better for usability and organization but the effect of the QD plugin is really cool.
From what I know, there are no properties or methods to script new snippets but it would be pretty cool if you could make a selection and have the Shift+S make a snippet of the selection and add it to the folder you choose from.
07-09-2015 08:24 AM
@Jacobson-ni wrote:
From what I know, there are no properties or methods to script new snippets but it would be pretty cool if you could make a selection and have the Shift+S make a snippet of the selection and add it to the folder you choose from.
There isn't really need for scripting methods. To make a snippet you just need to embed the VI file (or byte stream) into the PNG giving it the right section ID. The Code Capture Tool has the ability to do this and is a million times better than the native snippet tool.
So a QD command for a snippet shouldn't be too difficult, but can be a bit more work if it is based on a selection, and not just the whole VI.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-09-2015 08:43 AM - edited 07-09-2015 09:07 AM
@Jacobson-ni wrote:
Thanks, that worked for me. Like other people said, user.lib is probably better for usability and organization but the effect of the QD plugin is really cool.
From what I know, there are no properties or methods to script new snippets but it would be pretty cool if you could make a selection and have the Shift+S make a snippet of the selection and add it to the folder you choose from.
Yeah, if anything, this thread kicked me into placing some of those snippets into my userlib as "Place Contents". Worth my public embarrasment.
That's the original concept I had in mind. Something where you can select a bit of code and quickly store it with a set of tags. Maybe some automated tags based on functions, inputs/outputs, labels, and comments. This code goes into a storage location (snippet/VI/otherwise). Later you type a few abstract tags and scroll through a visible list until something jogs your memory. Maybe it's just me, but icons, actual code, and concepts mean more than words to me. I can use quick-drop but only by training with it. Quick drop never really felt intuitive but is incredibly efficient. In the end, this project is probably not worth the time. I did like the UI, so it might resurface in another idea.
07-09-2015 08:58 AM
It should probably be pointed out that there's already a QD shortcut (which I don't feel like looking up) that takes the current selection and saves it as a merge VI in user.lib, so that it's available in the palettes and you can drop it.