Jump to content

[Discuss] GetSnippet


Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=118

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

  • Like 2
Link to comment
  • 3 weeks later...

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

Link to comment

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)

Link to comment
  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.