NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Joven
Posts: 47
0 Kudos
Accepted Solution

Why snippet (png) cannot be loaded in labview?

Dear all,

 

I have tried to copy a few snippet (png) file and try to drag it to labview, but why it always fail to paste properly. It is still like a png file but it cannot be execute.

 

How do i solve that?

Knight of NI
Posts: 18,064
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

Please indicate the version of LabVIEW that you're using, as well as the specific message where you found this snippet.
Trusted Enthusiast
TCPlomp
Posts: 3,085
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

How do you copy and paste the snippets?

It won't work from Firefox directly. If you use firefox you need to drag and drop onto an explorerr window. then drag and drop into LabVIEW.

This might not work since firefox also embeds a BMP in the drag and drop stream.

 

Also the website might compress the PNG. The rules of PNG says that the embedded content that is unsafe (like a LabVIEW code snippet) should be removed, so it might be that the content is not available in the image.

 

Some more technical detail is on the LabVIEW Wiki.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Knight of NI
Knight of NI
tst
Posts: 10,236
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

Also, two more points.

 

First, the image in the other thread where you posted is not a snippet, just a regular PNG. Snippets have a border and a header.

 

Second, if the snippet is of a newer version, it won't work.


___________________
Try to take over the world!
Knight of NI
RavensFan
Posts: 13,234
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

It looks like the question came about because of this thread.  http://forums.ni.com/ni/board/message?board.id=170&thread.id=491814

 

The code posted was definitely not a snippet.  Just a portion of a screenshot.

Active Participant
jcarmody
Posts: 1,555
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

Just adding plug for making/extracting Snippets in pre-2009 LabVIEW versions.

Make them with the Code Capture Tool and extract them using this JKF RCF plugin.
Jim
CLD
Trusted Enthusiast
tbob
Posts: 4,073
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

Jim's signature says : ((361 / 22) + 81)^.25

 

The calculation results look like pi.  Can you explain the formula?  I'm just curious.

 

- tbob

Inventor of the WORM Global
Knight of NI
Posts: 18,064
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?


tbob wrote:

Jim's signature says : ((361 / 22) + 81)^.25

 

The calculation results look like pi.  Can you explain the formula?  I'm just curious.


It's supposedly a formula for a number that's claimed to be equal to PI. Not sure who came up with it. However, since PI is a transcental number, it's only valid up to a certain number of decimal places. In fact, Wolfram says it's not PI

Active Participant
jcarmody
Posts: 1,555
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

[ Edited ]

smercurio_fc wrote:
[...] However, since PI is a transcental number, it's only valid up to a certain number of decimal places.  

Could you imagine the trouble I get into if I published a discrete formula that exactly represented pi?

 

I wonder what would you have to enter into Wolfram to get it to say True (other than pi = pi)?  To be sure, they aren't comparing the left side of your test with the EXACT value of pi.  Anyway, this equation is only -1.00715E-9 away from Wolfram's interpretation of pi.

Message Edited by jcarmody on 04-19-2010 02:19 PM
Jim
CLD
Trusted Enthusiast
TCPlomp
Posts: 3,085
0 Kudos

Re: Why snippet (png) cannot be loaded in labview?

No, Pi is something between 3 and 4 (accoring to almost Indian (as in the US of A) law)

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page