LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To Snippet or not to Snippet?

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.

Matt J | National Instruments | CLA
0 Kudos
Message 11 of 14
(764 Views)

@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.

0 Kudos
Message 12 of 14
(758 Views)

@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.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 13 of 14
(735 Views)

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.


___________________
Try to take over the world!
Message 14 of 14
(726 Views)