LabVIEW is a visual programming language. To post code for other users on StackOverflow, I need to post an image of my block diagram. What is the best way to post such code?
The best way to show LabVIEW code on StackOverflow is to post a VI snippet as a PNG image.
A VI snippet is a PNG that can be viewed online just like any image. Unlike a regular PNG, it has embedded metadata so that when a user drops that PNG on a block diagram, instead of just pasting a picture, the code in the picture gets pasted. That allows other users to explore your multi-frame structure nodes and execute your code (if the code is not broken).
To create a VI snippet, select the code on a block diagram that you want (it can be the entire block diagram) then choose from the menus Edit >> Create VI Snippet From Selection. You will be prompted to save a .PNG file.
For example, doing this:
produces this:
Snippets will help StackOverflow users answer your questions. If you truly think you've found a bug in LabVIEW or need someone to investigate your whole hierarchy under an NDA, contact NI tech support ( http://ni.com ). Their legal department can work with you to set up ways to investigate code without violating NDAs.
Note that the default image hosting for StackOverflow is imgur.com. Many companies block imgur.com. If you can post your image on some other host and then link it in your post, more people may be able to see it.