jcarmody Posted December 23, 2009 Report Share Posted December 23, 2009 Name: GetSnippet Submitter: jcarmody Submitted: 23 Dec 2009 File Updated: 03 Jan 2011 Category: *Uncertified* LabVIEW Version: 8.2 License Type: BSD (Most common) GetSnippet RCF Plugin v1.0.0 Copyright @ 2009, Jim Carmody All rights reserved. Author: Jim Carmody LAVA name: jcarmody Contact Info: Contact via PM on www.lavag.org LabVIEW version: Created and tested with LabVIEW 8.2 Dependencies: JKI Right-Click Framework LabVIEW 8.2 or higher Description: The Code Capture Tool 2.0 can create a VI snippet in LV versions as old as 7.0; this plugin lets you extract them in versions 8.2 and above. Standard conditions apply - you won't be able to extract a snippet that was created in a newer version of LabVIEW. Instructions: Extract the zip file into [LabVIEW]\Resource\JKI\RCF\Plugins\GetSnippet and restart the RCF framework. Once installed, select a snippet, activate the RCF and select GetSnippet and your decoration will be replaced by the underlying code. Known Issues: Hardly anybody makes snippets in anything except LabVIEW 2009. The program works fine, though. Acknowledgements: Ton Plomp and Yair gave us the Code Capture Tool, without which there would be no need to extract snippets in LabVIEW < 2009. Darin.K showed me how to get a VI from a snippet. Ton helped me improve my implementation. Change Log: v1.0.0: Initial release of the code. License: BSD Support: If you have any problems with this code or want to suggest features: please go to www.lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the "Abort.vi" support page. Distribution: This code was downloaded from the LAVA Code Repository found at www.lavag.org Click here to download this file 2 Quote Link to comment
GregSands Posted January 11, 2010 Report Share Posted January 11, 2010 Nice! Any chance that it could work for a URL (Text Decoration)? That's what Firefox gives when dragging a PNG into LabVIEW. Quote Link to comment
jcarmody Posted January 11, 2010 Author Report Share Posted January 11, 2010 I don't believe so. Dragging from the web directly to a BD works in IE. I use Opera and have to download snippets then drag them in; I think Firefox is the same. Quote Link to comment
Yair Posted January 11, 2010 Report Share Posted January 11, 2010 I didn't look at how the plugin works, but you probably could adapt it to work with a URL - if you feed a URL followed by "[text]" (as in "]http://whatever[text]) into the Datasocket Read primitive, you will get the data in that URL as a string, which you can then either save directly to a PNG file, or copy straight into the clipboard (which I assume is what the plugin wants). Quote Link to comment
GregSands Posted January 11, 2010 Report Share Posted January 11, 2010 I took Yair's advice, and here's a possible enhancement for the GetSnippet plugin. There's no error-checking to ensure that the selected Text Decoration is in fact a valid URL, or that the resulting file is a snippet-embedded PNG file. Because the snippet decoding is the same for both, I've moved "Save To Buffer" back into Get Decoration (and also it doesn't seem like you need to open the block diagram or front panel, but perhaps I've missed something - haven't coded any RCF plugins before!). GetSnippet.llb (Saved for LV 8.2) Quote Link to comment
jcarmody Posted October 22, 2010 Author Report Share Posted October 22, 2010 Nice! Any chance that it could work for a URL (Text Decoration)? That's what Firefox gives when dragging a PNG into LabVIEW. I just found this Quick-Drop plugin that SimonH wrote to do this. It includes some VIs with locked Block Diagrams , but it's useful. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.